Page 1 of 10 123 ... LastLast
Results 1 to 10 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #1
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Service Menus with Dolphin

    About Dolphin:

    Dolphin File manager
    http://enzosworld.gmxhome.de/
    Dolphin is a file manager for KDE focusing on usability.

    Dolphin is not intended to be a competitor to Konqueror: Konqueror acts as universal viewer being able to show HTML pages, text documents, directories and a lot more, whereas Dolphin focuses on being only a file manager. This approach allows to optimize the user interface for the task of file management.

    The KDE 3 version of Dolphin is in beta stage, but provides already most features for daily usage. Currently Dolphin gets ported for KDE 4.0.

    The final version 1.0 of Dolphin for KDE 3 was originally planned for end of December 2006. In November Dolphin got a lot of support from Aaron J. Seigo and it has been decided to port Dolphin to KDE 4 as soon as possible. As there are not enough resources to maintain a KDE 3 version in parallel, the last release of Dolphin for KDE 3 has been 0.8.


    D3lphin 0.9:

    As mentioned on the roadmap, no official maintenance release for KDE 3 will be released anymore. But the good news is that Marcel Juhnke decided to do further bugfixing for the KDE 3 version of Dolphin and also included features like a second sidebar. As this is no official release, this project is named D3lphin and can be downloaded at marrat.homelinux.org. Please don't submit any bug reports for D3lphin to the KDE bug database and contact Marcel directly instead.

    Using Konqueror's Service Menus in the Dolphin

    You can use Konqueror servicemenus in the Dolphin (some of them). You only need to link/copy Konqueror service menus (.desktop files) from Konqueror servicemenu folder to the Dolphin servicemenu folder:

    KDE 3.5.X

    System wide (for all users) service menus:
    Konqueror: /usr/share/apps/konqueror/servicemenus/
    Dolphin: /usr/share/apps/dolphin/servicemenus/
    D3lphin: /usr/share/apps/d3lphin/servicemenus/

    Home folder (for a user) service menus:
    Konqueror: ~/.kde/share/apps/konqueror/servicemenus/
    Dolphin: ~/.kde/share/apps/dolphin/servicemenus/
    D3lphin: ~/.kde/share/apps/d3lphin/servicemenus/


    KDE 4

    From Bug 156476: dolphin should have action/service menus like konqueror has
    http://bugs.kde.org/show_bug.cgi?id=156476

    ------- Additional Comment #6 From David Faure 2008-01-24 13:48 -------
    Dolphin and konqueror (in kde4) support the exact same servicemenus. However the syntax is indeed NOT
    the kde3 syntax. Well, the syntax is pretty much the same but the location where to install the desktop files has changed.
    kdesdk/scripts/qt4/Porting mentions the changes:

    Servicemenus for konqueror and dolphin have moved to services/ServiceMenus/.
    To port kde3 servicemenus you need to:
    -> change installation rule so that it installs to ${SERVICES_INSTALL_DIR}/ServiceMenus
    -> add KonqPopupMenu/Plugin to the ServiceTypes line
    Development/Tutorials/Creating Konqueror Service Menus
    http://techbase.kde.org/Development/..._Service_Menus
    Where the Servicemenus Live

    Servicemenus are defined using .desktop files, which are the same kind of files that are used to create entries in the K Menu or on the KDE desktop. These servicemenu files are found in $KDEHOME/share/services/ServiceMenus, the directory KDE was installed to or any directory listed in the $KDEDIRS environment variable.

    In the case of my home machine that means that servicemenu files can be found in the following places:

    /opt/kde4/share/services/ServiceMenus/
    /usr/share/services/ServiceMenus/
    /home/aaron/.kde4/share/services/ServiceMenus/

    Kubuntu Intrepid Ibex (alpha 2) , KDE 4.1 (beta 2). Konsole command tells:
    Code:
     kde4-config --path services
    /home/rog/.kde/share/kde4/services/:/usr/share/kde4/services/
    that is

    System wide (for all users) service menus:
    /usr/share/kde4/services/ServiceMenus

    Home folder (for a user) service menus:
    /home/<USER>/.kde/share/kde4/services/ServiceMenus

    <USER> is your username !

    Specific folder actions
    Kubuntu forums topic: https://www.kubuntuforums.net/showth...folder-actions


    Service Menu Editor

    > KDE-Apps.org
    Depends on: KDE 4.x

    Description:
    KDE Service Menu Editor is a simple way of editing the right-click menus that you see when using Dolphin. It has simple but flexible way of selecting the "mime types" (type of file) that the menu should appear on. Then adding the menu is as simple as typing a name and the command to be run.

    Example
    Topic: Using Dolphin to batch process images like Konqueror?
    http://kubuntuforums.net/forums/inde...opic=3087984.0

    Easy way to make symlinks: Symlink by Click. Another way is simply copy desktop files.


    Some servicemenus might need a bit tuning. Kubicle tells:
    There are a few problems with servicemenus in dolphin (d3lphin), but the rootactions servicemenu can be 'tinkered with' to work better with dolphin:
    More: http://kubuntuforums.net/forums/inde...97261#msg97261

    Kubicle's Root Actions Servicemenu
    http://www.kde-apps.org/content/show...?content=48411
    Root Actions servicemenu is a replacement/alternative for the default Edit-as-root servicemenu in kubuntu.

    ----Notes for Dolphin users-------------------------------------------
    The service menu should work on KDE4 dolphin, though you might wish to edit rootactionsfolders.desktop and replace 'konqueror' with 'dolphin'

    KDE3 dolphin (d3lphin) has a few issues with servicemenus, so I've included a d3lphin friendly version of the menu in the download.

    New Service Menus for Dolphin

    From Creating Konqueror Service Menus
    http://developer.kde.org/documentati...vicemenus.html
    Introduction

    In KDE-speak a "servicemenu" is a special entry that appears in Konqueror's context menu depending on the file(s) that are selected. You may have seen them in action without even knowing it. For instance, if you have the KDE file archive utility "ark" installed you will see a menu entry to "Extract here..." whenever you right click on a tarball or zip file. The option to "Extract here..." is a servicemenu.

    Creating new servicemenus is very simple, requiring nothing more than an idea and a text editor. You don't have to be a programmer or a KDE wizard to make them.
    Background:
    theread told in the Topic: Preview enlargement in Dolphin
    http://kubuntuforums.net/forums/inde...opic=3088673.0
    Another useful facility missing from Dolphin is the right click menu with the move to: and the copy to: options on it. As far as I can see in Dolphin the only way to do it is to open the to and from directories and drag the file across, which is a pain if you have a lot open on the desktop at the time.
    Here is simple servicemenu for Dolphin. It will copy/move files to the destination folder (you choose destination folder from KDialog directory tree)

    Make text file copy_move_to.desktop file:
    Code:
    [Desktop Entry]
    ServiceTypes=all/allfiles,inode/directory
    Actions=CopyTo;MoveTo
    Encoding=UTF-8
    X-KDE-Submenu=Copy and Move To
    
    [Desktop Action CopyTo]
    Name=Copy To
    Icon=folder_man
    Exec=cp %U `kdialog --getexistingdirectory ~/`
    
    [Desktop Action MoveTo]
    Name=Move To
    Icon=folder_red_open
    Exec=mv %U `kdialog --getexistingdirectory ~/`
    Drop it to the /usr/share/apps/dolphin/servicemenus/ or /usr/share/apps/d3lphin/servicemenus/. That's it !


    Links:

    Topic: GtoK: .desktop files
    http://kubuntuforums.net/forums/inde...opic=3093180.0

    Dolphin File manager
    http://enzosworld.gmxhome.de/

    Topic: Using Dolphin to batch process images like Konqueror?
    http://kubuntuforums.net/forums/inde...opic=3087984.0

    Topic: Dolphin crashes
    http://kubuntuforums.net/forums/inde...opic=3086993.0

    Root Actions Servicemenu
    http://www.kde-apps.org/content/show...?content=48411

    Creating Konqueror Service Menus
    http://developer.kde.org/documentati...vicemenus.html

    Shell Scripting with KDE dialogs
    http://developer.kde.org/documentati...dialog/t1.html

    Topic: Disable Trash / KGPG Default Setting / Context Menu
    http://kubuntuforums.net/forums/inde...opic=3090842.0


    Previews:
    Attached Thumbnails Attached Thumbnails Service.jpg   KDialog.jpg  
    Last edited by Rog131; Mar 22nd 2014 at 04:20 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  2. Back To Top    #2
    Kubuntu as a Second Language
    Join Date
    Jan 2006
    Posts
    1,361
    Threads
    59
    Local Date
    Dec 23rd 2020
    Local Time
    07:09 PM

    Re: Service Menus with Dolphin

    This is an interesting workaround for D3lphin's shortcomings. Thanks for the howto. Let's see if we can get it inside Kubuntu by default for Hardy, IF we still have D3lphin enabled by default there.

  3. Back To Top    #3
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    Pack With Ark

    Link to Topic: Rar not working
    http://kubuntuforums.net/forums/inde...opic=3089986.0


    Dolphin don't have Konquerors "Compress As" menu. Simple way to add it to the Dolphin:

    Make "ark_pack.desktop" text file. Put there:
    Code:
    [Desktop Entry]
    ServiceTypes=all/allfiles,inode/directory
    Actions=Rar;Zip;7z
    Encoding=UTF-8
    X-KDE-Submenu=Pack With Ark
    
    [Desktop Action Rar]
    Name=Rar
    Icon=kimproxyoffline
    Exec=ark --add-to %U %U.rar 
    
    [Desktop Action Zip]
    Name=Zip
    Icon=knewstuff
    Exec=ark --add-to %U %U.zip
    
    [Desktop Action 7z]
    Name=7z
    Icon=kimproxyonline
    Exec=ark --add-to %U %U.7z
    Drop it to the /usr/share/apps/dolphin/servicemenus/ (or /usr/share/apps/d3lphin/servicemenus/).

    You need Ark, rar, zip and p7zip-full.

    Package: ark
    Description: graphical archiving tool for KDE
    Ark is a graphical program for managing various archive formats within the
    KDE environment. Archives can be viewed, extracted, created and modified
    from within Ark.
    .
    The program can handle various formats such as tar, gzip, bzip2, zip, rar and
    lha (if appropriate command-line programs are installed).
    .
    Ark can work closely with Konqueror in the KDE environment to handle archives,
    if you install the Konqueror Integration plugin available in the konq-plugins
    package.
    Package: rar
    Description: Archiver for .rar files
    This is the RAR archiver from Eugene Roshal. It supports multiple volume
    archives and damage protection. It can also create SFX-archives. There are
    versions which run on DOS, Windows (3.1x,95,NT), FreeBSD, BSDI.
    .
    This program is shareware and you must register it after 40 days of use.
    .
    Homepage: http://www.rarlabs.com/
    Package: zip
    Description: Archiver for .zip files
    This is InfoZIP's zip program. It produces files that are fully
    compatible with the popular PKZIP program; however, the command line
    options are not identical. In other words, the end result is the same,
    but the methods differ. :-)
    .
    This version supports encryption.
    Package: p7zip-full
    Description: 7z and 7za file archivers with high compression ratio
    p7zip is the Unix port of 7-Zip, a file archiver that archives with
    very high compression ratios.
    .
    p7zip-full provides:
    - /usr/bin/7za
    a standalone version of the 7-zip tool that handles 7z archives
    (implementation of the LZMA compression algorithm) and some other
    formats.
    - /usr/bin/7z
    not only does it handle 7z but also ZIP, Zip64, CAB, RAR, ARJ,
    GZIP, BZIP2, TAR, CPIO, RPM, ISO and DEB archives. 7z compression
    is 30-50% better than ZIP compression.
    .
    p7zip provides 7zr, a light version of 7za.
    .
    Homepage: http://p7zip.sourceforge.net/

    Note
    This is quick & dirty. It works but...
    - There is no name query: foo.foo -> foo.foo.rar
    - Multiple files will be named as foo1, foo2, foo3 -> foo3.rar


    Attached Thumbnails Attached Thumbnails Pack.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  4. Back To Top    #4
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    Add the whole path including file name into clipboard (klipper)

    Links to the Topic: Dolphin Media Name
    http://kubuntuforums.net/forums/inde...opic=3090789.0


    Make dklipper.desktop text file and drop it to the /usr/share/apps/d3lphin/servicemenus/ (or /usr/share/apps/dolphin/servicemenus/)

    dklipper.desktop:
    Code:
    [Desktop Entry]
    ServiceTypes=all/allfiles,inode/directory
    Actions=DKlipper;
    Encoding=UTF-8
    Type=Application
    
    [Desktop Action DKlipper]
    Type=Application
    Name=DKlipper
    Icon=attach
    Exec=dcop klipper klipper setClipboardContents %U

    With the KDE 4 same service menu (/usr/share/kde4/services/ServiceMenus):

    to_klipper.desktop
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/all;
    Actions=ToKlipper;
    X-KDE-Priority=TopLevel
    X-KDE-Submenu=OneLiners
    
    [Desktop Action ToKlipper]
    Name=To Klipper
    Icon=klipper
    Exec=qdbus org.kde.klipper /klipper org.kde.klipper.klipper.setClipboardContents "%U"

    Link:
    Copying data to the clipboard from the command line under KDE
    http://ftp.traduc.org/doc-vf/gazette.../104/104F.html


    Right click file (or folder) > Actions > DKlipper and:

    Preview Dolphin/Klipper
    Attached Thumbnails Attached Thumbnails Dolphin.jpg   klipper.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  5. Back To Top    #5
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    Symlinks by Click

    KDE 3.5

    By Symlink wiki:
    In computing, a symbolic link (often shortened to symlink and also known as a soft link) consists of a special type of file that serves as a reference to another file or directory. Unix-like operating systems in particular often feature symbolic links.

    With this context menu you can symlink files or folders to the another folder.

    1) Make symlink.desktop:
    Code:
    [Desktop Entry]
    ServiceTypes=all/allfiles,inode/directory
    Actions=Symlink;RootSymlink;
    Encoding=UTF-8
    X-KDE-Submenu=Symlinks by Click
    
    [Desktop Action Symlink]
    Type=Application
    Name=Symlink
    Icon=rebuild
    Exec=ln -s %U `kdialog --getexistingdirectory ~/` 
    
    [Desktop Action RootSymlink]
    Type=Application
    Name=RootSymlink
    Icon=bt
    Exec=kdesu "ln -s" "%U" `kdialog --getexistingdirectory /`
    2) Drop it in to the /usr/share/apps/d3lphin/servicemenus/(or /usr/share/apps/dolphin/servicemenus/. Location depends Dolphin version)

    3) Start linking.


    KDE 4

    Kubuntu Intrepid Ibex (pre-alpha); KDE 4.1 (beta 2)

    1) Making text file symlink.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin,all/all
    Actions=Symlink;RootSymlink;
    X-KDE-Submenu=Symlinks by Click
    
    [Desktop Action Symlink]
    Type=Application
    Name=Symlink
    Icon=edit-redo
    Exec=ln -s %U `kdialog --getexistingdirectory ~/` 
    
    [Desktop Action RootSymlink]
    Type=Application
    Name=RootSymlink
    Icon=edit-undo
    Exec=kdesudo "ln -s" "%U" `kdialog --getexistingdirectory /`

    2) Dropping symlink.desktop to the /usr/share/kde4/services/ServiceMenus or ~/.kde/share/kde4/services/ServiceMenus/

    3) Linking:
    Attached Thumbnails Attached Thumbnails Service.jpg   Where.jpg   Privileges.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  6. Back To Top    #6
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    Ark (KDE 3.5 package) with the KDE 4

    This is linking to the Topic: KDE4 and Ark

    Using Kubuntu Gutsy Gibbon - Pure KDE4 desktop: Topic: KDE4: Clean installation with live CD


    1) Installing: Ark

    Package ark
    Recommends: ncompress, unzip, zoo, bzip2, p7zip-full
    Suggests: khelpcenter, rar, unrar/unrar-free
    Installing ark +:
    ncompress (4.2.4.0-2)
    p7zip-full (4.51~dfsg.1-1)
    rar (1:3.7b1-2)
    unrar (1:3.7.3-1.1)
    unrar-free (1:0.0.1+cvs20070515-1)
    unzip (5.52-10ubuntu1)
    zoo (2.10-19)

    2) Making text files:

    ark35_compress.desktop
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin,all/all
    Actions=compressHere
    
    [Desktop Action compressHere]
    Name=Compress Here
    Exec=/usr/bin/ark --add-to %u %u.tar.gz
    Icon=ark

    ark35_extract.desktop
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/*;
    Actions=extractHere
    
    [Desktop Action extractHere]
    Name=Extract Here
    Exec=/usr/bin/ark --extract-to %d %u
    Icon=ark

    ark35_extract_subdir.desktop
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/*;
    Actions=ExtractSubdir
    
    [Desktop Action ExtractSubdir]
    Name=Extract to subdirectory
    Icon=ark
    Exec=/usr/bin/ark -caption "%c" %i %m --guess-name --extract-to "%d" "%u"

    3) Dropping .desktop files to the /usr/lib/kde4/share/kde4/services/ServiceMenus


    4) Testing - Compress Here:



    Working.


    Extract Here - working


    BUT Extract to subdirectory



    Mime type / file extension problem ?
    service.tar.gz => working but service.txt.tar.gz is not acceptable.

    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  7. Back To Top    #7
    Ascendant dibl's Avatar
    Join Date
    Oct 2006
    Posts
    12,955
    Threads
    176
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    @Rog -- is the "extract here" error caused by the /sda6/temp directory that already exists? Maybe it is refusing to write over the existing /temp.

  8. Back To Top    #8
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    is the "extract here" error caused by the /sda/temp directory that already exists?
    No, that will give a warning:



    It could be wildcards in the mimetype:
    Code:
    MimeType=application/*;
    With KDE 3.5 that is:
    Code:
    X-KDE-ServiceTypes=application/x-gzip,application/x-lha,application/x-tar...
    but that doesn't work with the KDE 4 (at the moment).

    Tested also with:
    Code:
    MimeType=application/x-gzip,application/x-lha,application/x-tar...
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  9. Back To Top    #9
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    MediaInfo

    This is linking to the Mediainfo application on Linux

    Update (Intrepid + Jaunty)
    Mediainfo and the mediainfo servicemenu can be found from the PPA repositories > Package name contains: mediainfo


    1) Making text file mediainfo.desktop:
    Code:
    [Desktop Entry]
    ServiceTypes=audio/*,video/*,application/vnd.rn-realmedia
    Actions=mediainfo;
    Encoding=UTF-8
    Type=Application
    
    [Desktop Action mediainfo]
    Type=Application
    Name=MediaInfo
    Icon=video
    Exec=mediainfo -f "%U" > .mediainfotemp.txt && kdialog --textbox .mediainfotemp.txt 640 480 && rm -f .mediainfotemp.txt
    2) Dropping it in to the /usr/share/apps/d3lphin/servicemenus/.

    3) Testing:
    Attached Thumbnails Attached Thumbnails MediaInfo.jpg   MediaKdialog.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  10. Back To Top    #10
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:09 AM

    Re: Service Menus with Dolphin

    Service menus Kubuntu Intrepid Ibex (pre-alpha), KDE 4.1 (Beta 2).


    This is linking: Any first impressions on KDE 4.1 beta for Kubuntu?


    This is using ark; version: 4:3.5.9-0ubuntu3


    Adding Compress Here, Extract Here and Extract to subdirectory service menus:

    1) Making text files:

    myark_compress.desktop
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin,all/all
    Actions=compressHere
    
    [Desktop Action compressHere]
    Name=Compress Here
    Exec=ark --add-to %u %u.tar.gz
    Icon=ark
    myark_extract.desktop
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/*;
    Actions=extractHere
    
    [Desktop Action extractHere]
    Name=Extract Here
    Exec=ark --extract-to %d %u
    Icon=ark
    myark_extract_subdir.desktop
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/*;
    Actions=ExtractSubdir
    
    [Desktop Action ExtractSubdir]
    Name=Extract to subdirectory
    Icon=ark
    Exec=ark -caption "%c" %i %m --guess-name --extract-to "%d" "%u"

    2) Dropping them in the /usr/share/kde4/services


    3) Testing...
    Attached Thumbnails Attached Thumbnails ServiceMenus.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

Page 1 of 10 123 ... LastLast
Service Menus with Dolphin - Page 2
Page 2 of 10 FirstFirst 1234 ... LastLast
Results 11 to 20 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #11
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    Service menu KArchiver

    This is linking: KDE Ark 4.1 Beta 2


    karchiver (repositories)
    work with compressed files
    With kArchiver, you can create and manipulate tar.gz, tar.bz2, zip, rar...
    archives just with your mouse. You can add files, remove (with undo/redo),
    view one or more files thanks to its multiselection window.

    You can also convert files between various archive formats, for example a
    tar.bz2 to a zip, or even create multi-platform self-extracting archives!

    KArchiver has some wizards that will help you in compiling and
    installing softwares through an interface, and in applying patches. It has
    an archive "browser", that displays archives in the current directory,
    a search tool (to quickly find all archives) and an automatic
    splitter/unsplitter to make a file fit on a floppy or inside an email.
    kArchiver has been made to be intuitive and powerful!
    > KArchiver KDE-Apps.org

    > KArchiver freshmeat


    Command:
    Code:
    karchiver --help
    tells:
    Options:
    -x, --extract <directory> Extract to the specified directory
    --xe, --extractgui Extract and choose directory in a dialog box
    --xh, --extracthere Extract to current directory
    --xa, --extractarchdir Extract to the directory where the archive is
    -c, --compress Make a .tar.gz archive from these files
    --nd, --withoutdcop disable DCOP. Some functions may not work!!
    --nw, --withoutwizard disable the configuration wizard
    --prefered <compressor_extension> Set the default compressor when right-clicking a file.Enter one of these extensions: tar, tar.gz, tar.bz2, zip, rar, lha, gz, bz2

    1) Making text file karchiver.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin,all/all
    Actions=CompressHere;ExtractHere;ExtractWhere;
    X-KDE-Submenu=KArchiver
    
    [Desktop Action CompressHere]
    Type=Application
    Name=Compress Here
    Exec=karchiver -c %U
    Icon=archive-insert
    
    [Desktop Action ExtractHere]
    Type=Application
    Name=Extract Here
    Exec=karchiver --xa %u
    Icon=archive-extract
    
    [Desktop Action ExtractWhere]
    Type=Application
    Name=Extract to Where
    Icon=archive-insert-directory
    Exec=karchiver --xe %u

    2) Dropping it in the /usr/share/kde4/services


    3) Testing notes

    - There is not "Extract to subdirectory". There is "Extract to Where" - karchiver will ask where to extract.
    - When compressing more that one file, karchiver will ask archive name, extension (name.zip, name.tar.gz ...) and where to save archive (Browse).

    Attached Thumbnails Attached Thumbnails KArchiver_Service.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  2. Back To Top    #12
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    Removing without Shift + Delete


    This is linking to the Topic: add delete to right click menu and to the Topic: Disabling the trash...


    Note / warning
    I don't use this and i don't recommend to use this :-X !


    KDE 3.5

    Making a remove.desktop file:
    Code:
    [Desktop Entry]
    ServiceTypes=all/allfiles,inode/directory
    Actions=remove;
    Encoding=UTF-8
    Type=Application
    
    [Desktop Action remove]
    Type=Application
    Name=Remove
    Icon=button_cancel
    Exec=rm -f "%U"
    Dropping .desktop file to the /usr/share/apps/d3lphin/servicemenus/


    man rm tells:
    RM(1) User Commands RM(1)

    NAME
    rm - remove files or directories

    SYNOPSIS
    rm [OPTION]... FILE...

    DESCRIPTION
    This manual page documents the GNU version of rm. rm removes each
    specified file. By default, it does not remove directories.

    If a file is unwritable, the standard input is a tty, and the -f or
    --force option is not given, rm prompts the user for whether to remove
    the file. If the response is not affirmative, the file is skipped.

    OPTIONS

    -f, --force
    ignore nonexistent files, never prompt

    KDE 4

    Making a .desktop file (delete.desktop):
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;inode/directory;
    Actions=remove;
    Encoding=UTF-8
    X-KDE-Priority=TopLevel
    
    [Desktop Action remove]
    Type=Application
    Name=Delete
    Icon=edit-delete
    Exec=rm -f "%U"
    and dropping it to the ~/.kde/share/kde4/services/ServiceMenus/

    Attached Thumbnails Attached Thumbnails Remove.jpg  
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  3. Back To Top    #13
    Newbie
    Join Date
    Nov 2008
    Posts
    2
    Threads
    1
    Local Date
    Dec 23rd 2020
    Local Time
    07:11 AM

    Re: Service Menus with Dolphin

    When I first installed KDE4 and ran Dolphin, the Action/Service Menus were the first things that I noticed were missing. I did not like how Konquer wanted to be the solve all solution to File Management, Media Player, Web Browser, etc... But, the one thing that made handling management of large amounts of files was partly (a big part) to do with the Service Menus. The quest was on to make them work in Dolphin. That led me here.

    While most of the information here helped, it is not complete and unfortunately there isn't much help elsewhere. So instead of naming who gave what good info and just adding mine, I will start from the top so that it is all in one place for the next person with the same problem. Before I begin I would like to thank everyone here for the help (you will probably see some of your info below ).

    Please note, this guide is for Kubuntu 8.10.

    Service Menu files are named:

    <service>.desktop

    where <service> is a whatever the author wants to name the file and is
    not seen in Dolphin. These files are located in various directories:

    System wide (for all users) service menus:

    • Konqueror: /usr/share/apps/konqueror/servicemenus
    • Dolphin: /usr/share/kde4/services/ServiceMenus


    Home folder (for a user) service menus:

    • Konqueror: ~/.kde/share/apps/konqueror/servicemenus
    • Dolphin: ~/.kde/share/kde4/services/ServiceMenus


    The location of the 'services' portion can be found by using the following command
    (only really needed if you are using a different distro or version of Kubuntu):

    bash$ kde4-config --path services

    Desktop files:

    The desktop file format for Dolphin is the same as for Konqueror except for two additional
    lines (below is a comparison):



    Konqueror
    Dolphin


    [Desktop Entry]

    Encoding=UTF-8
    ServiceTypes=all/allfiles
    Actions=Rename

    [Desktop Entry]
    Type=Service
    Encoding=UTF-8
    ServiceTypes=all/allfiles
    Actions=Rename

    X-KDE-ServiceTypes=KonqPopupMenu/Plugin




    Make a copy of the original Konqueror files to a temporary directory and add the lines
    in red to the files. Finally copy them into either your home ServiceMenu directory or the
    system's ServiceMenu directory, then if Dolphin is running close it and reopen it.

    Your newly ported Konqueror Service Menus should now be in your right click menus. 8)

    Hope this helps and thanx again for everyone's
    info here on the subject to bring all this together,

    -GrafXMan

  4. Back To Top    #14
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    Paste (copy) over an existing file

    This is linking to the Re: HOWTO : create own (partial) icon theme


    Earlier > Add the whole path including file name into clipboard (klipper)

    This service menu is using the information at the klipper to copy a (image) file over an existing file.


    KDE 3.5

    At the /usr/share/apps/d3lphin/servicemenus/. paste_over.desktop:
    Code:
    [Desktop Entry]
    ServiceTypes=image/*
    Actions=Paste_Over;
    Encoding=UTF-8
    Type=Application
    
    [Desktop Action Paste_Over]
    Type=Application
    Name=Paste Over
    Icon=svn_switch
    Exec=cp `dcop klipper klipper getClipboardContents` "%u"

    KDE 4

    At the /usr/share/kde4/services/ServiceMenus. paste_over.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/*;
    Actions=Paste_Over
    X-KDE-Priority=TopLevel
    X-KDE-Submenu=OneLiners
    
    [Desktop Action Paste_Over]
    Name=Paste Over
    Icon=svn_switch
    Exec=cp `qdbus org.kde.klipper /klipper org.kde.klipper.klipper.getClipboardContents` "%u"

    Use
    (this is with the KDE 4)

    File #1
    Right click a file > OneLiners > To Klipper
    - file name with the full path is copied to the clipboard.

    File #2
    Right click a image file > OneLiners > Paste Over
    - file, which name+path, is at the klipper is copied over the file #2.
    - file #2 will keep its orginal name, information is copied not the name.

    Pic: Copying images between > Leopard-Style and > Crystal-Project

    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  5. Back To Top    #15
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    Exif information context menu

    > Exchangeable image file format

    Exiftool > Exif viever
    Exiftool
    With ExifTool you will have the possibility to watch all or part of the EXIF values and to have them sorted by groups or not. ExifTool is a dedicated EXIF viewer, a free command line tool that works under Linux, Mac and Windows.
    The Exiftool is part of the package: libimage-exiftool-perl:
    Library and program to read and write meta information in multimedia files

    ExifTool is a Perl module with an included command-line application
    for reading and writing meta information in image, audio and video
    files. It recognizes EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile,
    Photoshop IRB, FlashPix, AFCP and ID3 meta information as well as the
    maker notes of many digital cameras including Canon, Casio, FujiFilm,
    JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Nikon, Olympus/Epson,
    Panasonic/Leica, Pentax/Asahi, Ricoh, Sanyo and Sigma/Foveon.
    Making a .desktop file (show_exif_information.desktop):
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/*;
    Actions=;ExifInformation;
    X-KDE-Priority=TopLevel
    X-KDE-Submenu=Image
    
    [Desktop Action ExifInformation]
    Name=Show Exif Information
    Icon=folder-image
    Exec=exiftool -a -u -g1 "%f" > .exif_information.txt && kdialog --textbox .exif_information.txt 640 480 && rm -f .exif_information.txt
    Dropping it to the ~/.kde/share/kde4/services/ServiceMenus and right clicking an image file > Image > Show Exif Information



    A KDialog window is popping up with:

    ---- ExifTool ----
    ExifTool Version Number : 7.30
    ---- File ----
    File Name : 2007-0503srb.jpg
    Directory : /media/sdb3/background
    File Size : 510 kB
    File Modification Date/Time : 2007:05:04 11:12:23
    File Type : JPEG
    MIME Type : image/jpeg
    Image Width : 571
    Image Height : 720
    Encoding Process : Baseline DCT, Huffman coding
    Bits Per Sample : 8
    Color Components : 3
    Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1)
    ---- JFIF ----
    ...
    ---- IPTC ----
    Application Record Version : 2
    Caption-Abstract : Installation Of Nose Cone/ Forward Skirt Onto Left SRB Segments. (MIX FILE)
    Keywords : SRB, Solid Rocket Booster
    ...
    ++ Lot of information...


    From the PPA repositories (> FAQ: Repositories ) : servicemenu-exif-information
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  6. Back To Top    #16
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    Two click wallpaper change
    This was working with the Kubuntu 9.04 / KDE 4.2.4, Kubuntu 9.10 (a6) / KDE 4.3.1

    This is linking to the > Topic: How to change desktop background from dolphin and/or gwenview in kde4?


    > change wallpaper & weather wallpaper
    by JaKi » Thu Aug 27, 2009 3:53 pm

    By now I change my wallpaper through a servicemenu. I have set the wallpaper in that dialog to use ~/background.jpg. And via the picture's servicemenu I copy another file to background.jpg. That works fine except for one exception: the new wallaper only appears after either a relogin or in current session when I open the wallpaper dialog and confirm it without changing anything. So I'd love to call that dialog from the servicemenu.


    by JaKi » Sat Sep 05, 2009 9:33 pm

    I installed the "next wallpaper" widget and it works fine even when the desktop is not in slideshow mode! I now set the wallpaper via my servicemenu (copy the chosen picture to background.jpg) and just have to click on the next wallpaper widget in the panel to let the new wallpaper smoothly blend in (I now use a subdirectory in which background.jpg is the only picture). Nice!

    Making a .desktop file to the ~/.kde/share/kde4/services/ServiceMenus:

    wallpaper.desktop
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/*;
    Actions=;SetWallpaper;
    X-KDE-Priority=TopLevel
    X-KDE-Submenu=Image
    
    [Desktop Action SetWallpaper]
    Name=Set Wallpaper
    Icon=folder-image
    Exec=convert "%f" ~/Wallpaper/MyWallpaper.jpg
    Update:
    I'm using the ImageMagic to scale&crop the image:
    Code:
    Exec=convert "%f" -resize 1680x1050^ -gravity center -extent 1680x1050 ~/Wallpaper/MyWallpaper.png

    Making a directory: Wallpaper in the home directory (/home/rog/Wallpaper).

    Click #1
    With the Dolphin > Right clicking the imagefile > Set Wallpaper



    Click #2
    Clicking the plasma-widget-nextwallpaper to show the new wallpaper.

    The wallpaper is changing.


    The "convert is part of the imagemagick. Package: imagemagick.

    man convert:
    NAME

    convert - convert between image formats as well as resize an image, blur, crop, despeckle, dither,
    draw on, flip, join, re-sample, and much more.

    SYNOPSIS
    convert input-file [options] output-file
    The plasma-widget-nextwallpaper is > KDE-Look / Next wallpaper:
    Simple applet that changes the current wallpaper (when in slideshow mode) on command
    It is in the repositories.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  7. Back To Top    #17
    Junior Member
    Join Date
    Jun 2007
    Posts
    16
    Threads
    6
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    I am trying to figure out how to make a service menu that will copy files from one split to the other.
    Any ideas?

  8. Back To Top    #18
    Ascendant Snowhog's Avatar
    Join Date
    Mar 2007
    Location
    Andover, MN
    Posts
    20,720
    Threads
    1021
    Local Date
    Dec 23rd 2020
    Local Time
    12:11 AM

    Re: Service Menus with Dolphin

    Click, drag, and drop isn't sufficient
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes
    Using Kubuntu Linux since March 23, 2007
    Twin Cities Bicycling Club - "And miles to go before I sleep."

  9. Back To Top    #19
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    I am trying to figure out how to make a service menu that will copy files from one split to the other.
    Any ideas?
    Yes , you need to get the other "panel" path but there is the problem .

    I looked the qdbus /1/ calls but i didn't find useful for the Dolphin splitted view.


    The Dolphin is a good (light one panel) file manager (> Dolphin philosophy). There is the "copy/move to" (Settings > Configure Dolphin > General > Context Menu > Show "copy To" and "Move To" commands)

    I would use the Krusader /2/ or other twin panel file managers if there is need to move lot of files between panels.


    /1/ (Q)D-Bus
    > D-Bus wiki
    > D-Bus Specification

    /2/ Package: Krusader (http://www.krusader.org/)
    twin-panel (commander-style) file manager

    Krusader is a simple, easy, powerful, twin-panel (commander-style) file
    manager, similar to Midnight Commander (C) or Total Commander (C).

    It provides all the file management features you could possibly want.

    Plus: extensive archive handling, mounted filesystem support, FTP,
    advanced search module, viewer/editor, directory synchronisation,
    file content comparisons, powerful batch renaming and much more.

    It supports archive formats: ace, arj, bzip2, deb, iso, lha, rar, rpm, tar,
    zip and 7-zip.

    It handles KIOSlaves such as smb:// or fish://.

    Almost completely customizable, Krusader is very user friendly, fast and looks
    great on your desktop.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  10. Back To Top    #20
    Junior Member
    Join Date
    Jun 2007
    Posts
    16
    Threads
    6
    Local Date
    Dec 23rd 2020
    Local Time
    06:11 AM

    Re: Service Menus with Dolphin

    Quote Originally Posted by Snowhog
    Click, drag, and drop isn't sufficient
    That's what I am doing now.
    But if I could create a service menu to copy from one panel to the other, I could do it without using the mouse, which would be easier.

Page 2 of 10 FirstFirst 1234 ... LastLast
Service Menus with Dolphin - Page 3
Page 3 of 10 FirstFirst 12345 ... LastLast
Results 21 to 30 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #21
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    Package naming

    Service menu packages are now (Lucid) : kde-service-menu-<application>


    > Bug #66508: ISO mount from context menu
    >> ISO mounting by default
    >>> [ubuntu/lucid] kde-service-menu-fuseiso 0.1-0ubuntu1 (Accepted)
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  2. Back To Top    #22
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    Personal Repository

    Earlier : http://www.kubuntuforums.net/showthr...cal-Repository


    Packages needed:
    • kdesudo
    • konsole
    • dpkg-dev
    • kdebase-bin (kdialog)



    Making a desktop file (add_debbies.desktop)
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/x-deb;
    Actions=Add_Debbies;_SEPARATOR_;DebbieSettings;
    Encoding=UTF-8
    X-KDE-Submenu=Personal Repository
    
    [Desktop Action Add_Debbies]
    Type=Application
    Name=Add Debbies
    Icon=application-x-deb
    Exec=debbies-install %f
     
    [Desktop Action DebbieSettings]
    Type=Application
    Name=Choose Package Manager
    Icon=configure
    Exec=debbies-configure
    and two script files:

    (debbies-configure)
    Code:
    #! /bin/bash
    
    SETTINGS=/home/$USER/.config/kde-service-menu/debbies-install-settings
    
    PACKAGE_MANAGER=`kdialog --title "Input dialog" --inputbox "What package manager would you like to use ?"`
    
    if [ -z "$PACKAGE_MANAGER" ]; then
      exit
    fi
    
    mkdir -p /home/$USER/.config/kde-service-menu/
    echo "PACKAGE_MANAGER="\"$PACKAGE_MANAGER\" > $SETTINGS
    and (debbies-install):
    Code:
    #! /bin/bash
    
    DIRECTORY="$(dirname "$1")"
    DEBBIE=" deb file:$DIRECTORY ./"
    PERSONAL_REPO=" /etc/apt/sources.list.d/$USER-personal-repository.list"
    SETTINGS=/home/$USER/.config/kde-service-menu/debbies-install-settings
    
    
    kdialog --passivepopup "Writing Packages.gz list"
    cd $DIRECTORY
    dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
    
    # add personal repo to /etc/apt/sources.list.d/
    kdesudo bash -c "echo $DEBBIE > $PERSONAL_REPO"
    
    kdesudo bash -c "konsole -e apt-get update"
    
    # ask package manager
    if [ ! -e "$SETTINGS" ]; then
      debbies-configure
    fi
    
    # wait package database update to finish
    while  ps -e | grep apt-get > /dev/null ; do
     sleep 1
    done
    
    . $SETTINGS
    
    kdesudo bash -c "$PACKAGE_MANAGER"

    As a .deb package > PPA for Rog131 >> Package name contains: personal-repository

    About Repositories and PPAs> FAQ: Repositories >> Using the PPA repositories


    Right clicking a .deb package...



    More > Personal Repository - kde servicemenu


    Links:

    > Repositories Personal
    > Creating (Konqueror) Service Menus
    > Shell Scripting with KDE Dialogs
    > Root Sudo
    > Redirect output with sudo
    Last edited by Rog131; Mar 26th 2012 at 10:52 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  3. Back To Top    #23
    Cyborg sithlord48's Avatar
    Join Date
    Apr 2007
    Location
    127.0.0.1
    Posts
    2,956
    Threads
    42
    Local Date
    Dec 23rd 2020
    Local Time
    01:36 AM

    Re: Service Menus with Dolphin

    i have created a service menu and uploaded it to kde-look.org , it appears under the GHNS menu but it does not install (its a tar.gz package) how can i 'fix' my service menu so it works correctly with GHNS ?
    btw the service menu is found here.
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

  4. Back To Top    #24
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    ...under the GHNS menu...
    GHNS ? probably not > Garden House Nursery School


    Do mean the "Get Hot New Stuff" and the > Service Menu Manager ?

    Last comment at the moment:
    Other problem: some menu file installed from "get new services menu", isn't installed correctly. Example: "Compress and Attach" servicemenus. What is the correct structure of the archive recognized by your program?
    Or do you mean something else ?
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  5. Back To Top    #25
    Cyborg sithlord48's Avatar
    Join Date
    Apr 2007
    Location
    127.0.0.1
    Posts
    2,956
    Threads
    42
    Local Date
    Dec 23rd 2020
    Local Time
    01:36 AM

    Re: Service Menus with Dolphin

    Quote Originally Posted by Rog131
    Do mean the "Get Hot New Stuff" and the > Service Menu Manager ?
    yes this is the correct thing. if you dl the archive its 2 .desktop files a shell script to copy them to the proper folder, and a small read me , the service menu manager should only have to exrtract and place the .desktop in the proper folder (same as my sh script does.) is there a guide somewhere to making get hot new stuff tar ball that will extract properly.
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

  6. Back To Top    #26
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    Oops Dolphin > Settings > Configure Dolphin > Services > Download New Services > GHNS.


    Hmm - With the Lucid, KDE 4.4.

    Trying the Download New Services:

    [img width=400 height=241]http://img337.imageshack.us/img337/2540/failedg.png[/img]
    Installation failed.
    Konsole is telling a bit more:
    dolphin(2667)/knewstuff (api): Command failed
    Kubuntu forums > Topic: Dolphin send file to Editor

    With the Maverick, KDE 4.5, same error.


    #1 Examining a bit - the Download New Services will- with an archive

    - Download the archive to the ~ /.kde/share/apps/servicemenu-download/
    - Unpack the archive to the ~ /.kde/share/apps/servicemenu-download/
    - Make a marking to the ~/.kde/share/apps/knewstuff3/servicemenu.knsregistry
    - Make the ~/.kde/share/kde4/services/ServiceMenus/ (if it doesn't exist)
    - The KDE is giving up -> error message.

    #2 Examining a bit - the Download New Services will- with a desktop file (2video4mobile)

    - Download the desktop file to the ~ /.kde/share/apps/servicemenu-download/
    - Make a marking to the ~/.kde/share/apps/knewstuff3/servicemenu.knsregistry
    - Make the ~/.kde/share/kde4/services/ServiceMenus/ (if it doesn't exist)
    - Copy the 105149-2video4mobile.desktop to the ~/.kde/share/kde4/services/ServiceMenus/




    Hmm -


    --------------- Update ---------------
    (With the Kubuntu 11.04 alpha-1, KDE 4.6.0)


    > Bug #706900 - Missing ruby
    > Bug #667704 - Ruby script can't find installation script

    --------------- Update ---------------
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  7. Back To Top    #27
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    Plymouth background and logo images context menu

    Standard Warning

    This service menu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


    Plymouth links > Plymouth III


    The kde-service-menu-set-plymouth-image needs:



    Writing a desktop ( > Topic: GtoK: .desktop files) file:
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/*;
    Actions=SetPlymouthBackground;SetPlymouthLogo;_SEPARATOR_;TurnOnBlanco;
    Encoding=UTF-8
    X-KDE-Submenu=Customize Plymouth
    
    [Desktop Action SetPlymouthBackground]
    Type=Application
    Name=Set Plymouth Background
    Icon=fill-color
    Exec=set-plymout-background "%f"
    
    [Desktop Action SetPlymouthLogo]
    Type=Application
    Name=Set Plymouth Logo
    Icon=format-text-color
    Exec=kdesudo bash -c "convert '%f' /lib/plymouth/themes/blanco/my_logo.png"
    
    [Desktop Action TurnOnBlanco]
    Type=Application
    Name=Turn On Plymouth Theme Blanco
    Icon=mail-mark-notjunk
    Exec=konsole --hold -e sudo bash -c " update-alternatives --config default.plymouth"
    and a script file (set-plymout-background):
    Code:
    #! /bin/bash
    
    TARGET="$1"
    SCREENDIMENSION=` xdpyinfo | grep dimensions | awk -F" " '{ print $2}' `
    
    kdesudo bash -c "convert '$TARGET' -resize $SCREENDIMENSION^ -gravity center -extent 
    $SCREENDIMENSION /lib/plymouth/themes/blanco/my_wallpaper.png"
    Now it is possible to change the plymouth background and logo images with a right click.




    An example package > Personal Package Archives for Ubuntu >> PPA for Rog131 >>> Package name contains: plymouth


    Propellerhead section
    i.e won't work without modification - it needs your kdm/ksplash themes information.

    Common Splash From Start To Finish - with a right click
    (Earlier > Topic: Common Splash From Start To Finish



    Adding few lines to set the grub, plymouth-theme-blanco, KDM, KSplash and
    KDE wallpaper/backgrounds. Script file (set-start-to-finish)

    Code:
    #! /bin/bash
    
    TARGET="$1"
    SCREENDIMENSION=` xdpyinfo | grep dimensions | awk -F" " '{ print $2}' `
    
    USETHISWALLPAPER="/lib/plymouth/themes/blanco/my_wallpaper.png"
    GRUBWALLPAPER="/usr/share/desktop-base/grub_background.sh"
    COLORNORMAL="black/black"
    COLORHIGHLIGHT="green/black"
    KDMBACKGROUND="/usr/share/kde4/apps/kdm/themes/Rog131/MyWallpaper.png"
    KSPLASH="/home/rog131/.kde/share/apps/ksplash/Themes/Rog131/1680x1050/MyWallpaper.png"
    KDEWALLPAPER="/home/rog131/Wallpaper/Next/MyWallpaper.png"
    
    # Plymouth
    kdesudo bash -c "convert '$TARGET' -resize $SCREENDIMENSION^ -gravity center -extent $SCREENDIMENSION $USETHISWALLPAPER"
    
    # GRUB
    kdesudo bash -c "mkdir -p /usr/share/desktop-base/ "
    kdesudo bash -c "echo WALLPAPER='\042'$USETHISWALLPAPER'\042' > $GRUBWALLPAPER"
    kdesudo bash -c "echo COLOR_NORMAL='\042'$COLORNORMAL'\042' >> $GRUBWALLPAPER"
    kdesudo bash -c "echo COLOR_HIGHLIGHT='\042'$COLORHIGHLIGHT'\042' >> $GRUBWALLPAPER"
    konsole -e sudo update-grub
    
    # KDM Splash
    kdesudo bash -c " kde-cp $USETHISWALLPAPER $KDMBACKGROUND"
    
    # KDE Splash
    kde-cp $USETHISWALLPAPER $KSPLASH
    
    # KDE Wallpaper
    kde-cp $USETHISWALLPAPER $KDEWALLPAPER

    Now it is possible to set the "Common Splash From Start To Finish" with a right click.




    More:

    > Topic: Customizing Kubuntu
    > Topic: Capturing the images of the ksplash & kdm & ksplash again
    > Creating Konqueror (KDE) Service Menus
    > ImageMagick
    > Two click wallpaper change
    Last edited by Rog131; Jan 25th 2012 at 11:00 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  8. Back To Top    #28
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    Removing selected video thumbnails

    Background > Thumbnail standard etc


    A desktop file (video-thumb-remover.desktop):
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=video/*;application/vnd.rn-realmedia;
    Actions=RemoveVideoThumb;
    Encoding=UTF-8
    X-KDE-Submenu=Video Thumbnail Remover
    
    [Desktop Action RemoveVideoThumb]
    Name=Remove selected thumbnails
    Icon=edit-delete
    Exec=video-thumb-remover.pl "%U"
    and a Perl script (video-thumb-remover.pl):
    Code:
    #!/usr/bin/perl -w
    
    use URI::Escape;
    use Digest::MD5 qw(md5_hex);
    
    $ARGV[0] =~ s' /' //'g;
    @FILENAMES = split(' /', $ARGV[0]);
    
    foreach $NAME (@FILENAMES) {
    
      $FULLNAME = "file://" . $NAME;
    
      $ESCAPED = uri_escape("$FULLNAME", "^A-Za-z0-9\-\._~/:()'");
      $THUMB = md5_hex("$ESCAPED");
    
      $THUMBNAME = $THUMB . ".png";
    
      unlink("$ENV{ HOME }/.thumbnails/large/$THUMBNAME");
      unlink("$ENV{ HOME }/.thumbnails/normal/$THUMBNAME");
    
    }
    for ($I=1;$I<9;$I++) { system ("qdbus org.kde.dolphin /dolphin/Dolphin_$I activateAction reload 2>/dev/null"); }
    Testing, before:




    Clicking Configure Dolphin > General > Previews and choosing another thumbnailer.

    Picking selected video clips. Action > Video Thumnail Remover > Remove selected thumbnails.


    A bit better.



    Links:
    > Creating KDE Service Menus
    > Desktop Entry Specification
    > URI::Escape - Escape and unescape unsafe characters
    > Digest::MD5 - Perl interface to the MD5 Algorithm
    Last edited by Rog131; Jan 25th 2012 at 11:01 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  9. Back To Top    #29
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    ... few more lines


    Adding few more lines to the Video Thumb Remover => Video Thumb Fixer.




    A tool to edit the Thumbnail Attributes (png images)

    Package: sng, man sng:
    NAME
    sng - compiler/decompiler for Scriptable Network Graphics

    SYNOPSIS
    sng [-ivV] [file...]

    DESCRIPTION
    The sng program translates between PNG (Portable Network Graphics) format and SNG (Scriptable Network Graphics) format. SNG is a printable and editable minilanguage for describing PNG files. With sng, it is easy to view and edit exotic PNG chunks not supported by graphics editors; also, since SNG is easy to generate from scripts, sng may be useful at the end of a pipeline that programmatically generates PNG images...

    A tool to edit thumbnails with the perl

    Package: perlmagick
    Description: Perl interface to the ImageMagick graphics routines
    PerlMagick is an objected-oriented Perl interface to ImageMagick.
    Use the module to read, manipulate, or write an image or image sequence from
    within a Perl script. This makes it very suitable for Web CGI scripts.
    Homepage: http://www.imagemagick.org/
    > ImageMagick - PerlMagick API


    A commandline tool to make multiple thumbnails from a video file

    Package: ffmpegthumbnailer, man ffmpegthumbnailer:
    NAME
    ffmpegthumbnailer - fast and lightweight video thumbnailer

    SYNOPSIS
    ffmpegthumbnailer [options]

    DESCRIPTION
    Ffmpegthumbnailer is a lightweight video thumbnailer that can be used by file managers to create thumbnails for your video files. The thumbnailer uses ffmpeg to decode frames from the video files, so supported videoformats depend on the configuration flags of ffmpeg.

    A tool to preview thumbnails and pick one

    Description: an application to show ffmpegthumbnailer images
    PictureFlow is a Qt widget to display images with animated transition effect,
    much like Apple's Cover Flow (used among others in iTunes, Finder, iPhone, and iPod).
    PictureFlow uses a portable and optimized software renderer and runs smoothly
    on smartphones and other mobile devices.

    http://code.google.com/p/pictureflow/

    The thumbflow is a modified pictureflow. Thumbflow is part of the
    kde-service-menu-video-thumb-fixer.

    Cli: thumbflow <backgroundcolor> <image dicectory>



    It is possible to use the VLC and the SMPlayer to take snapshots from the video files and make thumbnails from the snapshots.




    It is also possible to pick any image file to thumbnail. If the image is local then there is a KDialog file picker. From the net the image is first downloaded.



    > Perl HowTo: download a file from the internet


    An example from the Gnome side

    > imdb-thumbnailer (a bash script):
    This is a video thumbnailer that searches imdb for covers based on the file names. It works for movies in the specified paths (recursively). For the rest of the cases or if no cover is found the default thumbnailer is used.


    Links:

    > FAQ: Repositories
    >> Using the PPA repositories
    >>> PPA for Rog131 >>>> kde-service-menu-video-thumb-fixer
    Attached Files Attached Files
    Last edited by Rog131; Jan 25th 2012 at 11:02 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  10. Back To Top    #30
    Newbie
    Join Date
    Jan 2011
    Posts
    6
    Threads
    1
    Local Date
    Dec 23rd 2020
    Local Time
    06:36 AM

    Re: Service Menus with Dolphin

    Remove without shift+delete

    This is my version of Rog131's script.

    It works with folder (the -r option was missing). It also asks the user for confirmation before deleting the file\folder, it checks if the operation was completed successfully and if it fails to remove the file\folder it will report back to the user with the description of the error returned by rm.

    WARNING: as regards folder, it will delete the entire folder tree

    This is useful to delete a file\folder tree bigger than the trash-bin free space (dolphin will report an error without the possibility to remove the file permanently), or if you are sure you don't want to recover the file afterwards.

    Create a remove.desktop file. Copy this into the file

    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;inode/directory;
    Actions=remove;
    Encoding=UTF-8
    X-KDE-Priority=TopLevel
    
    [Desktop Action remove]
    Type=Application
    Name=Delete
    Name[it]=Rimuovi definitivamente
    Icon=edit-delete
    Exec=kdialog --warningyesno "The file\folder you selected will be deleted permanently. Are you sure?" && if [ $? = 0 ]; then errormsg=$(rm -f -r "%U" 2>&1 1>/dev/null); if [ $? = 1 ]; then kdialog --error "It is not possible to remove this object\n${errormsg}"; fi; fi
    Then copy remove.desktop in ~/.kde/share/kde4/services/ServiceMenus (create the folder if it does not exist).

Service Menus with Dolphin - Page 4
Page 4 of 10 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #31
    Master Skribe OneLine's Avatar
    Join Date
    Nov 2011
    Posts
    774
    Threads
    75
    Local Date
    Dec 23rd 2020
    Local Time
    09:41 AM

    Post Service Menu - Icon theme icon replacer

    A point&right click icon replacer.



    More: http://www.kubuntuforums.net/showthr...332#post289332


    The desktop part

    ~/.kde/share/kde4/services/ServiceMenus/replaceicon.desktop /1/, /2/:
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/png;
    Actions=replaceIconThemeIcon;
    
    [Desktop Action replaceIconThemeIcon]
    Name=Replace Icon Theme Icon
    Icon=tools-wizard.png
    Exec=perl ~/.bin/iconreplacer.pl %f

    The Perl script part

    ~/.bin/iconreplacer.pl:
    Code:
    #!/usr/bin/perl
    
    # argument: icon name with the path
    # action: ask the new picture and replace the same context/name icons 
    # with the correct resolution picture
    
    use strict;
    use warnings;
    
    # Modules
    use Image::Magick;
    
    my $showText = "Give the new picture";
    my @RESOLUTIONS = ("8x8","16x16","22x22","32x32","48x48","64x64","128x128","256x256","512x512");
    
    my @KONQUERORS = `"qdbus" "org.kde.konqueror*"`;
    chomp (@KONQUERORS);
    my @DOLPHINS = `"qdbus" "org.kde.dolphin*"`;
    chomp (@DOLPHINS);
    
    my ($newIcon, $resolution, $konqueror, $dolphin);
    #my (@writeLog);
    
    # split argument
    my @themePath = split('/', $ARGV[0]);
    
    my $fileName = pop(@themePath);
    my $iconContext = pop(@themePath);
    pop(@themePath);
    
    # get the new picture
    my $newPicture = `"kdialog" "--title" "$showText" "--getopenfilename" "." "*.png *.jpg *.gif"`;
    chomp ($newPicture);
    
    # write the new icons
    foreach $resolution (@RESOLUTIONS) {
       my $fileCandidate = join("/", @themePath) . "/" . $resolution . "/" . $iconContext . "/" . $fileName;
       if (-e $fileCandidate) {
          chomp($fileCandidate);
          $newIcon = Image::Magick->new;
          $newIcon->Read($newPicture);
          $newIcon->Resize(geometry=>$resolution);
          $newIcon->Write($fileCandidate);
    #      push(@writeLog, $fileCandidate);
       } 
    }
    
    #my @KDIALOGCALL = ("kdialog", "--msgbox", "@writeLog \n \n replaced with \n \n $newPicture");
    #system @KDIALOGCALL;
    
    # refresh the konquerors and dolphins
    foreach $konqueror (@KONQUERORS) { system ("qdbus $konqueror /konqueror/MainWindow_1 activateAction reload 2>/dev/null"); }
    
    foreach $dolphin (@DOLPHINS) { system ("qdbus $dolphin /dolphin/Dolphin_1 activateAction reload 2>/dev/null"); }
    Notes

    - Working at here. May or may not work at there
    - Needs package: perlmagick
    - More notifications: uncomment the lines 22, 44, 48, 49.




    Links

    1. http://www.freedesktop.org/wiki/Spec...top-entry-spec
    2. http://techbase.kde.org/Development/..._Service_Menus
    Last edited by OneLine; Feb 26th 2012 at 05:20 PM.

  2. Back To Top    #32
    Esteemed Member Rog132's Avatar
    Join Date
    Jun 2011
    Posts
    661
    Threads
    38
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM

    Post Face detection with the thumbnailer

    The FFMpegThumbs-MattePaint /1,2 / can use the KDE service menus to add/remove the thumbnails. There is a simple way to detect the faces from the pictures /3/ with the Perl Image::ObjectDetect /4/ module.




    A script to detect the faces from the video thumbnails and reject/approve the thumbnail.



    Note!
    This is working only with the 'large' /5/ thumbnails (=> 96 pixels).
    A workaround is to link the normal & large thumbnail directories.

    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    use Getopt::Long;
    use Pod::Usage;
    use URI::Escape;
    use Digest::MD5 qw(md5_hex);
    use Image::ObjectDetect;
    
    my $name;
    my $member;
    
    # using libkface-data
    my $cascade  = '/usr/share/kde4/apps/libkface/haarcascades/haarcascade_frontalface_alt.xml';
    my $detector = Image::ObjectDetect->new($cascade);
    
    $ARGV[0] =~ s' /' //'g;
    my @fileNames = split(' /', $ARGV[0]);
    
    foreach $name (@fileNames) {
       my $fullName = "file://" . $name;
       my $escapedName = uri_escape("$fullName", "^A-Za-z0-9\-\._~/:()&'");
       my $thumbName = md5_hex("$escapedName") . ".png";
       
       my $picFile  = ("$ENV{ HOME }/.thumbnails/large/$thumbName");
    
    #  search faces - try max 10 times
       for ( my $i = 1; $i <= 10; $i++ ) {
    
          my @faces = $detector->detect($picFile);
          last if ( scalar @faces > 0 );
    
    #     remove old thumbnails
          unlink("$ENV{ HOME }/.thumbnails/large/$thumbName");
    
    #     refresh/reload the filemanager window
          my @konquerors = `"qdbus" "org.kde.konqueror*"`;
          chomp (@konquerors);
          foreach $member (@konquerors) { system ("qdbus $member /konqueror/MainWindow_1 activateAction reload 2>/dev/null"); }
    
          my @dolphins = `"qdbus" "org.kde.dolphin*"`;
          chomp (@dolphins);
          foreach $member (@dolphins) { system ("qdbus $member /dolphin/Dolphin_1 activateAction reload 2>/dev/null"); }
    
    #     wait new thumbnail
          open( DUMP , ">/dev/null" );
          until ( -e "$ENV{ HOME }/.thumbnails/large/$thumbName" ) { 
             print DUMP "waiting thumbnail \n"; 
          }
          close (DUMP);
       }
    }


    Direct: http://youtu.be/di6MdAQbfew


    Links

    1. http://kde-apps.org/content/show.php...content=153902
    2. https://www.kubuntuforums.net/showth...l=1#post345474
    3. http://code-and-hacks.peculier.com/p...econgition-in/
    4. http://search.cpan.org/~jiro/Image-O...bjectDetect.pm
    5. http://specifications.freedesktop.or...ec-latest.html


    PPA packages: https://launchpad.net/~samrog131/+ar...series_filter=
    Last edited by Rog132; Feb 19th 2014 at 08:28 PM.

  3. Back To Top    #33
    Esteemed Member Rog132's Avatar
    Join Date
    Jun 2011
    Posts
    661
    Threads
    38
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM

    Post KF5 Service Menus

    (using Kubuntu 15.04 alpha2)


    KDE4 has

    Code:
    madprophet@Velvet:~$ kde4-config --path services
    /home/madprophet/.kde/share/kde4/services/:/usr/share/kde4/services/

    KF5 has

    Code:
    madprophet@Velvet:~$ kf5-config --path services
    /home/madprophet/.local/share/kservices5/:/usr/share/kservices5/

    The Kubuntu 15.04 is a hybrid system. There are KDE4 applications and there are new KF5 applications. The KDE4 parts are looking the service menus from:

    ~/.kde/share/kde4/services/ServiceMenus/
    and
    /usr/share/kde4/services/ServiceMenus/

    The new KF5 service menus are at:

    ~/.local/share/kservices5/ServiceMenus/
    and
    /usr/share/kservices5/ServiceMenus/


    To get the KF5 service menus to the KDE4 applications the KF5 service menu directory can be linked to the KDE4 directory.



    ..and there are the KF5 service menus with the Dolphin (KDE4).

    Last edited by Rog132; Feb 20th 2015 at 06:28 PM.

  4. Back To Top    #34
    Master Skribe OneLine's Avatar
    Join Date
    Nov 2011
    Posts
    774
    Threads
    75
    Local Date
    Dec 23rd 2020
    Local Time
    09:41 AM

    Post Plasmafication

    Linking: https://www.kubuntuforums.net/showth...l=1#post369248

    The service menu desktop - plasmafication.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/*;
    Actions=plasmaficationImage;removePlasmoid;
    X-KDE-Submenu=Plasmafication tools
    Icon=plasma
    
    [Desktop Action plasmaficationImage]
    Name=Plasmafication of Image
    Icon=preferences-desktop-plasma
    Exec=plasmafication.pl %f
    
    [Desktop Action removePlasmoid]
    Name=Remove plasmoid
    Icon=plasma
    Exec=plasmafication-remover.pl


    Few short scripts to make and remove the image plasmoids.

    plasmafication.pl :

    Installs a picture plasmoid so it can be added to the plasma 5 desktop.
    Code:
    #!/usr/bin/perl
    
    # argument: a picture with full path
    #
    # actions:
    # write icon picture to the ~/.local/share/icons/Plasmafication/
    # write metadata.desktop to the /tmp/...
    # write main.qml to the /tmp/...
    # execute the plasmapkg2 to install the plasmoid
    #
    # using:
    # perlmagick
    # kde-baseapps-bin (kdialog)
    
    use strict;
    use warnings;
    
    # modules
    use File::Basename;
    use Image::Magick;
    use File::Path qw(make_path);
    
    # replace whitespace with undescore
    my $image = $ARGV[0];
    my $imageName = fileparse($image,'\..*');
    my $spacelessName = $imageName;
    $spacelessName =~ s' '_'g;
    
    
    # icon
    my $newIcon;
    my $iconResolution = "128x128";
    my $iconPlace = "$ENV{ HOME }/.local/share/icons/Plasmafication";
    mkdir $iconPlace;
    my $iconOut = "$iconPlace/plasmafication.$spacelessName.png";
    
    $newIcon = Image::Magick->new;
    $newIcon->Read($image);
    $newIcon->Resize(geometry=>$iconResolution);
    $newIcon = $newIcon->Montage(geometry=>$iconResolution, background=>'transparent');
    $newIcon->Write($iconOut);
    
    
    # desktop
    my $temporary = "/tmp/plasmafication.$spacelessName";
    make_path("$temporary/plasmafication.$spacelessName/contents/ui");
    open(OUT, ">$temporary/plasmafication.$spacelessName/metadata.desktop");
    
    print OUT '[Desktop Entry]',"\n";
    print OUT 'Name=Picture Plasmoid',"\n";
    print OUT 'Comment=Show ',"$imageName","\n";
    print OUT 'Encoding=UTF-8',"\n";
    print OUT 'Icon=',"$ENV{ HOME }/.local/share/icons/Plasmafication/plasmafication.$spacelessName","\n";
    print OUT 'ServiceTypes=Plasma/Applet',"\n";
    print OUT 'Type=Service',"\n";
    print OUT 'X-KDE-PluginInfo-Name=','plasmafication',"\.","$spacelessName","\n";
    print OUT 'X-Plasma-API=declarativeappletscript',"\n";
    print OUT 'X-Plasma-MainScript=ui/main.qml',"\n";
    
    
    # main.qml
    open(OUT, ">$temporary/plasmafication.$spacelessName/contents/ui/main.qml");
    
    print OUT 'import QtQuick 2.0',"\n";
    print OUT "\n";
    print OUT 'Rectangle {',"\n";
    print OUT '    width: 300',"\n";
    print OUT '    height: 300',"\n";
    print OUT "\n";
    print OUT '    Image {',"\n";
    print OUT '        anchors.fill: parent',"\n";
    print OUT '        fillMode: Image.PreserveAspectFit',"\n";
    print OUT '        smooth: true',"\n";
    print OUT '        source:', "\"","$image","\"","\n";
    print OUT '    }',"\n";
    print OUT '}',"\n";
    
    
    # execute plasmapkg2 --install
    system ("plasmapkg2", "--install", "$temporary/plasmafication.$spacelessName");
    plasmafication-remover.pl - removes the picture plasmoid:
    Code:
    #!/usr/bin/perl
    
    # no arguments
    #
    # actions:
    # show file picker (kdialog) to pick the removed plasmoid
    # remove picked plasmoid
    # remove icon
    #
    # using:
    # kde-baseapps-bin (kdialog)
    
    use strict;
    use warnings;
    
    # modules
    use File::Basename;
    
    # picker
    my $iconPlace = "$ENV{ HOME }/.local/share/icons/Plasmafication";
    my $image = `"kdialog" '--getopenfilename' '$iconPlace' '*.png'`;
    chomp ($image);
    my $imageName = fileparse($image,'.png');
    
    # execute plasmapkg2 --remove
    system ("plasmapkg2", "--remove", "$imageName");
    
    # remove icon
    unlink($image);

  5. Back To Top    #35
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM

    Post Using embedded mp4 cover art with the KDE thumbnailer

    Linking to http://askubuntu.com/questions/67956...d-use-built-in

    Earlier: https://www.kubuntuforums.net/showth...l=1#post380103


    With the KDE4:

    Making: ~/.kde/share/kde4/services/ServiceMenus/mattepaint-mp4.desktop
    Code:
    [Desktop Entry]
    Type=Service
    Icon=kdenlive-add-clip
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=video/mp4;
    Actions=useMp4Image;pickMp4Image
    #X-KDE-Priority=TopLevel
    X-KDE-Submenu=Video Thumbnail Fixer
    Encoding=UTF-8
    InitialPreference=69
    
    [Desktop Action useMp4Image]
    Name=Use a picture from the Mp4 attachments
    Icon=mail-attachment
    Exec=mp4-image-to-thumbnaill.pl "%U"
    
    [Desktop Action pickMp4Image]
    Name=Pick a picture from the Mp4 attachments
    Icon=project-open
    Exec=mp4-pick-image-to-thumbnail.pl "%U"



    Writing Perl scripts:

    /usr/local/bin/mp4-image-to-thumbnail.pl
    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    # perl modules
    use URI::Escape;
    use Digest::MD5 qw(md5_hex);
    use File::Copy;
    use Time::HiRes qw(usleep nanosleep);
    
    my @pictureSuffix = ( '*.png','*.jpg');
    
    my @kdeLocalprefix = ("kde4-config", '--localprefix');
    chomp(my $kdeHome = `@kdeLocalprefix`) or die "Can't find the kde home";
    
    my $ffmpegthumbsDir = $kdeHome . "share/apps/ffmpegthumbs-mattepaint/";
    my $attachmentsToThumbnail = $ffmpegthumbsDir . "cleanOne";
    my $createMissingdir = $ffmpegthumbsDir;
    my $parsleyDir = $createMissingdir . "AtomicParsley/";
    
    mkdir $createMissingdir;
    mkdir $parsleyDir;
    
    $ARGV[0] =~ s' /' //'g;
    my @fileNames = split(' /', $ARGV[0]);
    
    # extract attached cover to the ../ffmpegthumbs-mattepaint/cleanOne
    foreach my $name (@fileNames) {
       my $fullName = "file://" . $name;
       my $escapedName = uri_escape("$fullName", "^A-Za-z0-9\-\._~/:()&'");
       my $thumbName = md5_hex("$escapedName") . ".png";
      
       my @extractCall = ( "AtomicParsley", "$name", "-e", "$parsleyDir");
       system (@extractCall) == 0 or die "Can't execute the AtomicParsley";
       
       chdir $parsleyDir;
       my @globFiles = glob ("@pictureSuffix");
       print scalar @globFiles;
       if (scalar @globFiles == 0) { next; }
       copy ("$globFiles[0]", "$attachmentsToThumbnail") or die "Can't copy";
       unlink @globFiles;
    
    # remove old thumbnails
       unlink("$ENV{ HOME }/.thumbnails/large/$thumbName");
       unlink("$ENV{ HOME }/.thumbnails/normal/$thumbName");
    
    #  refresh/reload the filemanager window
       my @konquerors = `"qdbus" "org.kde.konqueror*"`;
       chomp (@konquerors);
       foreach my $member (@konquerors) { system ("qdbus $member /konqueror/MainWindow_1 activateAction reload 2>/dev/null"); }
    
       my @dolphins = `"qdbus" "org.kde.dolphin*"`;
       chomp (@dolphins);
       foreach my $member (@dolphins) { system ("qdbus $member /dolphin/Dolphin_1 activateAction reload 2>/dev/null"); }
    
    #  wait new thumbnail
       open( DUMP , ">/dev/null" );
       until ( -e "$ENV{ HOME }/.thumbnails/large/$thumbName" || -e  "$ENV{ HOME }/.thumbnails/normal/$thumbName" ) { 
          print DUMP "waiting thumbnail \n"; 
       }
       close (DUMP);
       usleep(5000);
    }
    and

    /usr/local/bin/mp4-pick-image-to-thumbnail.pl
    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    # perl modules
    use URI::Escape;
    use Digest::MD5 qw(md5_hex);
    use File::Copy;
    use Time::HiRes qw(usleep nanosleep);
    
    my @pictureSuffix = ( '*.png','*.jpg');
    
    my @kdeLocalprefix = ("kde4-config", '--localprefix');
    chomp(my $kdeHome = `@kdeLocalprefix`) or die "Can't find the kde home";
    
    my $ffmpegthumbsDir = $kdeHome . "share/apps/ffmpegthumbs-mattepaint/";
    my $attachmentsToThumbnail = $ffmpegthumbsDir . "cleanOne";
    my $createMissingdir = $ffmpegthumbsDir;
    my $parsleyDir = $createMissingdir . "AtomicParsley/";
    
    mkdir $createMissingdir;
    mkdir $parsleyDir;
    
    $ARGV[0] =~ s' /' //'g;
    my @fileNames = split(' /', $ARGV[0]);
    
    # extract attached cover to the ../ffmpegthumbs-mattepaint/cleanOne
    foreach my $name (@fileNames) {
       my $fullName = "file://" . $name;
       my $escapedName = uri_escape("$fullName", "^A-Za-z0-9\-\._~/:()&'");
       my $thumbName = md5_hex("$escapedName") . ".png";
      
       my @extractCall = ( "AtomicParsley", "$name", "-e", "$parsleyDir");
       system (@extractCall) == 0 or die "Can't execute the AtomicParsley";
       
       chdir $parsleyDir;
       my @globFiles = glob ("@pictureSuffix");
       if (scalar @globFiles == 0) { next; }
       if (scalar @globFiles > 1 ){
          my $pickThumbnail = `"kdialog" "--getopenfilename" "$parsleyDir"`;
          chomp ($pickThumbnail);
          copy ("$pickThumbnail", "$attachmentsToThumbnail") or die "Can't copy";
       } else {
          copy ("$globFiles[0]", "$attachmentsToThumbnail") or die "Can't copy";
       }   
       unlink @globFiles;
    
    # remove old thumbnails
       unlink("$ENV{ HOME }/.thumbnails/large/$thumbName");
       unlink("$ENV{ HOME }/.thumbnails/normal/$thumbName");
       
    #  refresh/reload the filemanager window
       my @konquerors = `"qdbus" "org.kde.konqueror*"`;
       chomp (@konquerors);
       foreach my $member (@konquerors) { system ("qdbus $member /konqueror/MainWindow_1 activateAction reload 2>/dev/null"); }
    
       my @dolphins = `"qdbus" "org.kde.dolphin*"`;
       chomp (@dolphins);
       foreach my $member (@dolphins) { system ("qdbus $member /dolphin/Dolphin_1 activateAction reload 2>/dev/null"); }
    
    #  wait new thumbnail
       open( DUMP , ">/dev/null" );
       until ( -e "$ENV{ HOME }/.thumbnails/large/$thumbName" || -e  "$ENV{ HOME }/.thumbnails/normal/$thumbName" ) { 
          print DUMP "waiting thumbnail \n"; 
       }
       close (DUMP);
       usleep(5000);
    }
    Checking that the scripts are executable.

    Testing.



    Seems to work - at here.
    Last edited by Rog131; Oct 6th 2015 at 02:52 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  6. Back To Top    #36
    Ghost in the Machine Teunis's Avatar
    Join Date
    Jun 2006
    Location
    The Netherlands, 5m. below sea level.
    Posts
    3,629
    Threads
    173
    Local Date
    Dec 23rd 2020
    Local Time
    07:41 AM
    So good we have this forum!

    After installation of the Root Actions Service Menu in Dolphin on 15.10 I noticed they were not showing and remembered there was this 'hybrid' problem.

    This is the relevant bit from Rog's post needed to fix the issue:
    The Kubuntu 15.04 is a hybrid system. There are KDE4 applications and there are new KF5 applications. The KDE4 parts are looking the service menus from:

    ~/.kde/share/kde4/services/ServiceMenus/
    and
    /usr/share/kde4/services/ServiceMenus/

    The new KF5 service menus are at:

    ~/.local/share/kservices5/ServiceMenus/
    and
    /usr/share/kservices5/ServiceMenus/
    Open Dolphin, press Alt+. to view the hidden stuff, F3 to get a split pane view, in the left pane you open the kde4 path, in the right the kde5 one.

    In the kde4 path you should see the installed menu's .desktop files, drag them to the right pane and select Link.

    Done.
    Last edited by Teunis; Dec 13th 2015 at 05:51 PM. Reason: Grammar

  7. Back To Top    #37
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM

    Post GHNS wrong paths

    The Dolphin is using ruby script to install and deinstall Service Menus. Looking Dolphin 16.08.2 /usr/bin/servicemenuinstallation
    and /usr/bin/servicemenudeinstallation and finding that they are still using KDE4 paths. Filing a bug report: Bug 371907 - Dolphin, KDE Framework, service menu installation and deinstallation ruby scripts are using KDE4 paths - https://bugs.kde.org/show_bug.cgi?id=371907
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  8. Back To Top    #38
    Ancient vinnywright's Avatar
    Join Date
    Apr 2009
    Posts
    8,016
    Threads
    181
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM
    Quote Originally Posted by Rog131 View Post
    The Dolphin is using ruby script to install and deinstall Service Menus. Looking Dolphin 16.08.2 /usr/bin/servicemenuinstallation
    and /usr/bin/servicemenudeinstallation and finding that they are still using KDE4 paths. Filing a bug report: Bug 371907 - Dolphin, KDE Framework, service menu installation and deinstallation ruby scripts are using KDE4 paths - https://bugs.kde.org/show_bug.cgi?id=371907
    added my as well stating it was the same on Kubuntu-16.04 and Neon dev/stable as well ,,,,,,,,shouldn't be that hard to confirm ,,,,it's a script.

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

  9. Back To Top    #39
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM

    Post The Dolphin service menu GHNS is not using KDE Store

    Bug 376922 - Don't show new Service Menus in KDE Store - https://bugs.kde.org/show_bug.cgi?id=376922
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  10. Back To Top    #40
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:41 AM
    Both Bugs 371907 and Bug 376922 fixed with the https://cgit.kde.org/dolphin.git/com...10e40880bc3a1a

    => KDE Applications 17.04 / Dolphin 17.04 or later
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

Page 4 of 10 FirstFirst ... 23456 ... LastLast
Service Menus with Dolphin - Page 5
Results 41 to 50 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #41
    Esteemed Member acheron's Avatar
    Join Date
    May 2016
    Location
    UK
    Posts
    871
    Threads
    29
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM
    Quote Originally Posted by Rog131 View Post
    Both Bugs 371907 and Bug 376922 fixed with the https://cgit.kde.org/dolphin.git/com...10e40880bc3a1a

    => KDE Applications 17.04 / Dolphin 17.04 or later
    Hmmmm. Backportable, maybe...
    On #kubuntu-devel & #kubuntu on irc.freenode.net - IRC Nick: RikMills - Launchpad ID: click

  2. Back To Top    #42
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM

    Only text file editing needed - 1,2,3 done

    Quote Originally Posted by acheron View Post
    Hmmmm. Backportable, maybe...
    Meanwhile - it is fixable for the users:

    1)

    Code:
    $ locate servicemenu.knsrc
    =>
    Code:
    kdesudo kate /etc/xdg/servicemenu.knsrc
    change:
    Code:
    ProvidersUrl=http://download.kde.org/khotnewstuff/servicemenu-providers.xml
    to
    Code:
     
    ProvidersUrl=http://download.kde.org/ocs/providers.xml
    Categories=Dolphin Service Menus
    2)

    Code:
    $ locate servicemenudeinstallation
    change:
    Code:
    FileUtils.rm(`kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/" + File.basename(archive))
    to:
    Code:
    FileUtils.rm(`qtpaths --writable-path GenericDataLocation`.strip! + "/kservices5/ServiceMenus/" + File.basename(archive))
    and

    3)

    Code:
    $ locate servicemenuinstallation
    change:
    Code:
    $servicedir = `kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/"
    to:
    Code:
    $servicedir = `qtpaths --writable-path GenericDataLocation`.strip! + "/kservices5/ServiceMenus/"
    Last edited by Rog131; Mar 14th 2017 at 05:52 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  3. Back To Top    #43
    Ascendant GreyGeek's Avatar
    Join Date
    Feb 2009
    Posts
    16,801
    Threads
    1192
    Local Date
    Dec 23rd 2020
    Local Time
    12:45 AM

    Service Menus with Dolphin

    Thanks, Rog131! Worked perfectly!
    Last edited by GreyGeek; Mar 17th 2017 at 04:03 AM.

  4. Back To Top    #44
    Esteemed Member acheron's Avatar
    Join Date
    May 2016
    Location
    UK
    Posts
    871
    Threads
    29
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM
    On #kubuntu-devel & #kubuntu on irc.freenode.net - IRC Nick: RikMills - Launchpad ID: click

  5. Back To Top    #45
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM

    Post sudoedit with the Kate

    Linking: https://www.kubuntuforums.net/showth...l=1#post399157

    AskUbuntu: Proper way to let user enter password for a bash script using only the GUI (with the terminal hidden): http://askubuntu.com/questions/31439...y-the-gui-with

    =>

    Writing files:

    /usr/local/bin/sudoeditkate.sh
    Code:
    #!/bin/sh 
    
    export EDITOR=/usr/bin/kate
    export SUDO_ASKPASS=/usr/local/bin/sudoeditpass.sh
    sudoedit -A "$1"
    /usr/local/bin/sudoeditpass.sh
    Code:
    #!/bin/sh
    kdialog --password 'sudoedit needs user (sudo) password to execute the kate'
    $Home/.local/share/kservices5/ServiceMenus/rootkate.desktop
    Code:
    [Desktop Entry]
    Type=Service
    Icon=kate
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=sudoeditKate;
    X-KDE-Priority=TopLevel
    #X-KDE-Submenu=
    Encoding=UTF-8
    
    [Desktop Action sudoeditKate]
    Name=sudoedit kate
    Icon=kate
    Exec=sudoeditkate.sh "%U"
    Testing...



    ...Seems to work
    Last edited by Rog131; Apr 8th 2017 at 07:32 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  6. Back To Top    #46
    Ascendant GreyGeek's Avatar
    Join Date
    Feb 2009
    Posts
    16,801
    Threads
    1192
    Local Date
    Dec 23rd 2020
    Local Time
    12:45 AM
    Quote Originally Posted by GreyGeek View Post
    Thanks, Rog131! Worked perfectly!
    Until I checked today.
    Seems some update in the last three weeks reversed the changes.
    Re-doing them, they still work (on fully updated Neon User Edition).

    PS - I checked the kservice5 Dolphin service menu changes and they had been reverted as well. Changed them back to Rog's solution.

  7. Back To Top    #47
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM
    Working in Kubuntu 16.04 with Dolphin version 16.04.3 (and Plasma 5.8.7):

    Two ways to copy path and filename to clipboard:
    https://www.kubuntuforums.net/showth...l=1#post402060 requires xsel
    https://www.kubuntuforums.net/showth...l=1#post402061 requires xclip

    Then I made a very simple "Open with mpv" menu entry:
    Code:
    [Desktop Entry]
    Actions=open-with-mpv
    ServiceTypes=KonqPopupMenu/Plugin
    #MimeType=inode/directory
    MimeType=application/octet-stream
    Type=Service
    X-KDE-Priority=TopLevel
    
    [Desktop Action open-with-mpv]
    Exec=mpv %U
    Name=Open with mpv
    Icon=mpv
    I changed
    Code:
    MimeType=application/octet-stream
    to
    Code:
    MimeType=all/all
    so I can open folders or individual files.
    Last edited by chimak111; Jul 23rd 2017 at 02:05 PM.

  8. Back To Top    #48
    Ancient vinnywright's Avatar
    Join Date
    Apr 2009
    Posts
    8,016
    Threads
    181
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM
    Quote Originally Posted by chimak111 View Post
    Working in Kubuntu 16.04 with Dolphin version 16.04.3 (and Plasma 5.8.7):

    Two ways to copy path and filename to clipboard:
    https://www.kubuntuforums.net/showth...l=1#post402060 requires xsel
    https://www.kubuntuforums.net/showth...l=1#post402061 requires xclip

    Then I made a very simple "Open with mpv" menu entry:
    Code:
    [Desktop Entry]
    Actions=open-with-mpv
    ServiceTypes=KonqPopupMenu/Plugin
    #MimeType=inode/directory
    MimeType=application/octet-stream
    Type=Service
    X-KDE-Priority=TopLevel
    
    [Desktop Action open-with-mpv]
    Exec=mpv %U
    Name=Open with mpv
    Icon=mpv
    ok ,,gota ask ,,,why "mpv" is not that a media player ,,,,I'v never used it .

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

  9. Back To Top    #49
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM
    Quote Originally Posted by vinnywright View Post
    ok ,,gota ask ,,,why "mpv" is not that a media player ,,,,I'v never used it .
    VINNY
    It has a minimal GUI and I'm used to it on my Lubuntu laptop. I'm using the ppa version: https://launchpad.net/~mc3man/+archi..._filter=xenial.

    The one in the standard repos is quite old (and gave me trouble with kwin as well).

    Plus I wanted to make a service menu all of my very own

  10. Back To Top    #50
    Ancient vinnywright's Avatar
    Join Date
    Apr 2009
    Posts
    8,016
    Threads
    181
    Local Date
    Dec 23rd 2020
    Local Time
    06:45 AM
    Quote Originally Posted by chimak111 View Post
    It has a minimal GUI and I'm used to it on my Lubuntu laptop. I'm using the ppa version: https://launchpad.net/~mc3man/+archi..._filter=xenial.

    The one in the standard repos is quite old (and gave me trouble with kwin as well).

    Plus I wanted to make a service menu all of my very own
    O ,,,so you made a service menu to launch mpv on a media file .

    I thought you were still talking about getting the full path and filename of some file to the clipboard.

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

Page 5 of 10 FirstFirst ... 34567 ... LastLast
Service Menus with Dolphin - Page 6
Page 6 of 10 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #51
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM

    Post Use This As Icon

    Linking to Thread: Dolphin folder display, one photo only as thunbnail. - https://www.kubuntuforums.net/showth...bnail?p=408667

    With the KDE Frameworks 5.41.0 (kio) , KDE Applications 17.12.0 (Dolphin), Plasma 5.11.4 (kde-cli-tools).

    Making a desktop file - useThisAsIcon.desktop

    Code:
    [Desktop Entry]
    Type=Service
    Icon=image-x-icon
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=thisIcon;
    Encoding=UTF-8
    
    [Desktop Action thisIcon]
    Name=Use this as folder icon
    Icon=image-x-icon
    Exec=useThisAsIcon.sh "%f"


    And a script file - useThisAsIcon.sh:

    Code:
    #!/bin/sh
    # Usage: useThisAsIcon /path/to/file.extension
    
    file=$1
    directory=$(dirname "${file}")
    
    kioclient5 copy "thumbnail://$file" "$directory/.cover.png"
    kwriteconfig5 --file "$directory/.directory" --group 'Desktop Entry' --key Icon ./.cover
    The script file is executing the kio thumbnail and writing the thumbnail to the .cover.png. The script is also writing the icon key to the the KDE .directory file:





    More of the kioclient and the kwriteconfig can be found with the commands:

    Code:
    kioclient --help
    kwriteconfig --help
    With the KDE Frameworks 5 the commands are kioclient5 and the kwriteconfig5.
    Last edited by Rog131; Jan 5th 2018 at 07:41 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  2. Back To Top    #52
    Isomorphic Algorithm MoonRise's Avatar
    Join Date
    May 2006
    Location
    SC
    Posts
    5,102
    Threads
    384
    Local Date
    Dec 23rd 2020
    Local Time
    01:46 AM
    Nice!! Thanks!

    EDIT: Oddly I add that desktop entry to `/.kde/share/kde4/services/ServiceMenus/ but for some reason does not show up even on a reboot. Will play around some, but any feedback?
    Last edited by MoonRise; Jan 6th 2018 at 02:54 PM.


  3. Back To Top    #53
    Ancient vinnywright's Avatar
    Join Date
    Apr 2009
    Posts
    8,016
    Threads
    181
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by MoonRise View Post
    Nice!! Thanks!

    EDIT: Oddly I add that desktop entry to `/.kde/share/kde4/services/ServiceMenus/ but for some reason does not show up even on a reboot. Will play around some, but any feedback?
    are you running plasma5 ?

    try /home/vinny/.local/share/kservices5/ServiceMenus/ ,,,,,,,of corse change "vinny" to your user name and you may half to make the "kservices5" directory .

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

  4. Back To Top    #54
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    11,074
    Threads
    474
    Local Date
    Dec 23rd 2020
    Local Time
    01:46 AM
    ..and rebooting isn't necessary. At the most closing and re-launching Dolphin, but even that shouldn't be necessary. They should be available immediately.
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

  5. Back To Top    #55
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM

    Post KDE4 vs KF5

    Paths

    Service menus are looked at...

    Earlier: https://www.kubuntuforums.net/showth...l=1#post367207

    KDE4 - Debian based:

    ~/.kde/share/kde4/services/ServiceMenus/
    and
    /usr/share/kde4/services/ServiceMenus/

    KF5:

    ~/.local/share/kservices5/ServiceMenus/
    and
    /usr/share/kservices5/ServiceMenus/

    A quick test

    with
    $ dolphin -v
    Qt: 4.8.6
    KDE Development Platform: 4.14.2
    Dolphin: 4.14.2
    ~/.kde/share/kde4/services/ServiceMenus/useThisAsIcon.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    Icon=image-x-icon
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=thisIcon;
    Encoding=UTF-8
    
    [Desktop Action thisIcon]
    Name=Use this as folder icon
    Icon=image-x-icon
    Exec=useThisAsIcon.sh "%f"
    Executable useThisAsIcon.sh:
    Code:
    #!/bin/sh
    # Usage: useThisAsIcon /path/to/file.extension
    
    file=$1
    directory=$(dirname "${file}")
    
    kioclient copy "thumbnail://$file" "$directory/.cover.png"
    kwriteconfig --file "$directory/.directory" --group 'Desktop Entry' --key Icon ./.cover
    In the right place - told by echo $PATH.

    Seems to work =>



    Notes

    The KDE4 Dolphin is not refreshing the view. The user need to press F5 to reload the folder icons.

    The KDE4 Dolphin/kio is squashing the icons to square. KF5 keep the image proportions.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  6. Back To Top    #56
    Isomorphic Algorithm MoonRise's Avatar
    Join Date
    May 2006
    Location
    SC
    Posts
    5,102
    Threads
    384
    Local Date
    Dec 23rd 2020
    Local Time
    01:46 AM
    Thanks All!


  7. Back To Top    #57
    Newbie
    Join Date
    Jul 2018
    Posts
    3
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by Rog131 View Post
    Linking to Thread: Dolphin folder display, one photo only as thunbnail. - https://www.kubuntuforums.net/showth...bnail?p=408667

    With the KDE Frameworks 5.41.0 (kio) , KDE Applications 17.12.0 (Dolphin), Plasma 5.11.4 (kde-cli-tools).

    Making a desktop file - useThisAsIcon.desktop

    Code:
    [Desktop Entry]
    Type=Service
    Icon=image-x-icon
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=thisIcon;
    Encoding=UTF-8
    
    [Desktop Action thisIcon]
    Name=Use this as folder icon
    Icon=image-x-icon
    Exec=useThisAsIcon.sh "%f"
    And a script file - useThisAsIcon.sh:

    Code:
    #!/bin/sh
    # Usage: useThisAsIcon /path/to/file.extension
    
    file=$1
    directory=$(dirname "${file}")
    
    kioclient5 copy "thumbnail://$file" "$directory/.cover.png"
    kwriteconfig5 --file "$directory/.directory" --group 'Desktop Entry' --key Icon ./.cover
    Hi Rog131 & everybody,
    I tried to add this service menu to my Kubuntu 18.04, but I don't understand exactly, where to put the useThisAsIcon.sh and what to do exactly with it.
    What do you mean by:
    In the right place - told by echo $PATH.
    Thank you in advance about a timely response!
    Chipy

  8. Back To Top    #58
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by Chipy View Post
    Hi Rog131 & everybody,
    I tried to add this service menu to my Kubuntu 18.04, but I don't understand exactly, where to put the useThisAsIcon.sh and what to do exactly with it.
    What do you mean by:

    Thank you in advance about a timely response!
    Chipy
    Hi !

    What is PATH ?: http://www.linfo.org/path_env_var.html
    PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user. It increases both the convenience and the safety of such operating systems and is widely considered to be the single most important environmental variable...

    A list of all the current environmental variables and their values for the current user, including all the directories in the PATH variable, can be seen by running the env command without any options or arguments (i.e., input data), i.e.,

    env

    As there can be considerable output, it can be convenient to modify this command so that it displays just the PATH environmental variable and its value. This can be accomplished by using a pipe (represented by the vertical bar character) to transfer the output of env to the grep filter and use PATH as an argument to grep, i.e.,

    env | grep PATH

    Another way to view the contents of just PATH alone is by using the echo command with $PATH as an argument:

    echo $PATH

    echo repeats on the display screen whatever follows it on the command line. The dollar sign immediately preceding PATH tells echo to repeat the value of the variable PATH rather than its name.

    Each user on a system can have a different PATH variable...
    AskUbuntu - How to add a directory to the PATH?: https://askubuntu.com/questions/6021...ry-to-the-path

    At here the useThisAsIcon.sh is in the $HOME/.bin/:



    as my $PATH includes it.

    The useThisAsIcon.sh is executable:



    so I can execute it when I right click a file:



    The desktop file ($HOME/.local/share/kservices5/ServiceMenus/useThisAsIcon.desktop) has line:

    Code:
    Exec=useThisAsIcon.sh "%f"
    The Exec key: https://standards.freedesktop.org/de...t/ar01s07.html

    The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments. The executable program can either be specified with its full path or with the name of the executable only. If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment...
    Last edited by Rog131; Jul 16th 2018 at 10:34 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  9. Back To Top    #59
    Newbie
    Join Date
    Jul 2018
    Posts
    3
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by Rog131 View Post
    Hi !

    What is PATH ?: http://www.linfo.org/path_env_var.html

    AskUbuntu - How to add a directory to the PATH?: https://askubuntu.com/questions/6021...ry-to-the-path

    At here the useThisAsIcon.sh is in the $HOME/.bin/:

    as my $PATH includes it.

    The useThisAsIcon.sh is executable:

    so I can execute it when I right click a file:

    The desktop file ($HOME/.local/share/kservices5/ServiceMenus/useThisAsIcon.desktop) has line:

    Code:
    Exec=useThisAsIcon.sh "%f"
    The Exec key: https://standards.freedesktop.org/de...t/ar01s07.html
    Hi Rog131,
    thank you very much for your fast answer!

    I checked with
    Code:
    echo $PATH
    and got as result
    Code:
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    So I moved the executable useThisAsIcon.sh to
    Code:
    /usr/local/bin
    , where I also have two other executable files for service menus.

    But I'm only getting an Internal Error and there is no new icon...

    Any further ideas?

    Thank you in advance!
    Chipy

  10. Back To Top    #60
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by Chipy View Post

    ...But I'm only getting an Internal Error and there is no new icon...

    Any further ideas?

    Thank you in advance!
    Chipy
    Hi !

    Do you see something like:

    or something else ?

    In this case the image file has a wrong extension.
    A bug report: Bug 220496 - Preview of pictures when content type does not match extension - https://bugs.kde.org/show_bug.cgi?id=220496

    You could check if there is a wrong extension with the file command:
    Code:
    $ file /media/sda1/GifWallpapers/1358773.jpg
    /media/sda1/GifWallpapers/1358773.jpg: GIF image data, version 89a, 460 x 460
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

Page 6 of 10 FirstFirst ... 45678 ... LastLast
Service Menus with Dolphin - Page 7
Page 7 of 10 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #61
    Newbie
    Join Date
    Jul 2018
    Posts
    3
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    No, it only says :
    No plugin specified.

  2. Back To Top    #62
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by Chipy View Post
    No, it only says :
    What kind of file ?
    What is the extension ?

    I get the error - No plugin specified - When the kioclient5 doesn't link the filename pattern to the correct file type.
    i.e with the 'video.mpeg-4' the thumbnailer can thumbnail it but the kioclient5 command doesn't understand the type.



    Last edited by Rog131; Jul 16th 2018 at 04:22 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  3. Back To Top    #63
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM

    Post Magick pile of Polaroids

    With the help of the ImageMagick /1/ the KDE icons can be made from the piles of polaroids.



    The context menu desktop part - $HOME/.local/share/kservices5/ServiceMenus/magickpile.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    Icon=view-list-icons
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=magickPile;
    Encoding=UTF-8
    
    [Desktop Action magickPile]
    Name=Magick pile of icons
    Icon=view-list-icons
    Exec=magickpile.pl "%F"


    The thumbnail polaroids are scooped from the thumbnail cache and piled with a short Perl script - magickpile.pl:
    Code:
    #!/usr/bin/perl
    
    # usage: magickpile.pl filelist
    
    use strict;
    use warnings;
    
    # modules
    use Image::Magick;
    use File::Spec;
    use URI::Escape;
    use Digest::MD5 qw(md5_hex);
    
    my $angle;
    my @newIcon;
    
    my $i = 0;
    my $iconResolution = '256x256';
    
    my $cachePath = $ENV{XDG_CACHE_HOME} || ("$ENV{HOME}/.cache");
    my $thumbPath = "$cachePath/thumbnails/large/";
    
    $ARGV[0] =~ s' /' //'g;
    my @fileNames = split(' /', $ARGV[0]);
    my ($volume,$workDir,$file) = File::Spec->splitpath( $fileNames[0] );
    my $iconOut = "$workDir.magickpile.png";
    
    # pile of thumbs
    foreach my $name (@fileNames) {
    $i++;
    my $fullName = "file://" . $name;
    my $escapedName = uri_escape("$fullName", "^A-Öa-ö0-9\-\.,_~/:()&!\@\\[\\]'");
    $escapedName=~ s'\|'%7C'g;
    $escapedName=~ s'%24'$'g;
    $escapedName=~ s'\{'%7B'g;
    $escapedName=~ s'\}'%7D'g;
    my $thumbName = md5_hex("$escapedName") . ".png";
    my $angle = int(rand(30))-15;
    $newIcon[$i] = Image::Magick->new;
    $newIcon[$i]->Read("$thumbPath$thumbName");
    $newIcon[$i]->Polaroid(angle => $angle, gravity => 'center', background => 'transparent');
    $newIcon[$i] = $newIcon[$i]->Montage(geometry=>$iconResolution, background=>'transparent');
    if ($i > 1) { 
    $newIcon[1]->Composite(image=>$newIcon[$i],compose=>'over', gravity=>'center');
    $newIcon[$i]->Set(quality=>100);
    }
    }
    
    $newIcon[1]->Write("$iconOut");
    system ("kwriteconfig5", "--file", "$workDir.directory", "--group", "Desktop Entry", "--key", "Icon", "./.magickpile.png");
    Executable script 'magickpile.pl' is located in the $PATH. The script is using PerlMagick /2/

    Note !

    This script is using 'Correctly encode URL of thumbnails' /3/. It won't work with the older KDE Frameworks (<5.46 ?). At here, now, the KF 5.48.0.

    It is getting the thumbnails from the thumbnail cache. If the thumbnailer /4/ is not caching then it won't work with this type of thumbnails.

    Preview



    Direct: https://youtu.be/-JEfOa8gAWQ

    Links

    1. https://www.imagemagick.org/script/index.php
    2. http://www.imagemagick.org/script/perl-magick.php
    3. https://cgit.kde.org/kio.git/commit/...499eff3b976162
    4. https://api.kde.org/frameworks/kio/h...mbCreator.html
    Last edited by Rog131; Jul 17th 2018 at 04:05 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  4. Back To Top    #64
    Newbie
    Join Date
    Aug 2018
    Posts
    3
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    08:46 AM
    Can you make these scripts work in the dolphin menu?
    They are used to print the selected files without first opening them.
    They work in nautilus and derived file managers, but I do not know how to make them work in Kubuntu.

    https://ubuntu-mate.community/t/prin...-in-caja/15885

    Thanks

  5. Back To Top    #65
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by SDG10 View Post
    Can you make these scripts work in the dolphin menu?
    They are used to print the selected files without first opening them.
    They work in nautilus and derived file managers, but I do not know how to make them work in Kubuntu.

    https://ubuntu-mate.community/t/prin...-in-caja/15885

    Thanks
    There is no need 'to carry coals to Newcastle': https://idioms.thefreedictionary.com...s+to+Newcastle.

    A bit easier is to search from the KDE Store:

    The KDE Store: https://store.kde.org
    Dolphin Service Menus: https://store.kde.org/browse/cat/102/

    Searching - Search results for "pdf": https://store.kde.org/search/projectSearchText/pdf/

    A sample: KDE 5 Service Menu PDF - https://store.kde.org/p/1227799/

    Editing a bit (*)- Only adding the option to print selected files without first opening them:



    (*)
    1) Unpacking the 'kde-service-menu-pdf_1.0_all.tar.gz'
    2) Copying the executable 'pdfprint-kdialog' (**) to the $PATH.
    3) Adding a desktop file - pdfprintfiles.desktop:
    Code:
    [Desktop Entry]
    Type=Service
    Icon=printer
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/pdf
    Actions=printPdfFiles;
    X-KDE-Submenu=Pdf Print
    Encoding=UTF-8
    
    [Desktop Action printPdfFiles]
    Icon=printer
    Name=Print selected documents
    Name[de]=Ausgewählte Dokumente drucken
    Name[fr]=Imprimer les documents sélectionnés
    Name[it]=Stampa i documenti selezionati
    Name[ru]=Распечатать выбранные документы
    Exec=pdfprint-kdialog %F
    to the $HOME/.local/share/kservices5/ServiceMenus/

    (**)
    Though the script has name, pdfprint-kdialog, it will print other file types with the lpr if the user wants to.
    Last edited by Rog131; Aug 10th 2018 at 09:27 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  6. Back To Top    #66
    Newbie
    Join Date
    Aug 2018
    Posts
    3
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    08:46 AM
    OK thank you very much ,
    but it's not really the same thing.

    That script can print everything because it contains both the lpr and libreoffice commands, it also gives an error message if you select a non-printable file (eg mp3) and you can have it in the default printer version or you can specify which printer to use, so in the context menu you can get "print with HP" or "Print with Samsung", for instance, and I find this very useful.

    I'm new to Kubuntu and I would like to have the same thing as Ubuntu Mate, if possible.

    Is that too much to ask?

  7. Back To Top    #67
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    11,074
    Threads
    474
    Local Date
    Dec 23rd 2020
    Local Time
    01:46 AM
    You can either install Caja to your system and use their script and Caja. Or if you want to stick to Dolphin, then rewrite the script to use the correct print commands for KDE ("lp" for plain files and "libreoffice -p" for office files) or you can just write your own servicemenu desktop files and put them in ~/.local/share/kservices5/ServiceMenus/.

    Here's a start for you; If you have libreoffice installed, it will print almost anything from the command line. It will use it's default print settings. Create a file from the code below and put it in ~/.local/share/kservices5/ServiceMenus/ and try it out:
    Code:
    [Desktop Entry]
    Actions=print-file
    Icon=print
    MimeType=application/pdf;image/*;application/vnd.oasis.opendocument.text;text/plain;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.presentation;application/msword;application/vnd.ms-word;application/vnd.ms-excel;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.spreadsheet.sheet;application/vnd.openxmlformats-officedocument.presentationml.presentation;
    ServiceTypes=KonqPopupMenu/Plugin
    Encoding=UTF-8
    Type=Service
    X-KDE-Priority=TopLevel
    
    
    [Desktop Action print-file]
    Exec=lp %f
    Exec=libreoffice -p %f 
    Icon=stock_print
    Name=Print Now
    I tested this here on an image, a libreoffice document, a pdf, and a plain text file. Works for me.
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

  8. Back To Top    #68
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM
    Quote Originally Posted by SDG10 View Post
    OK thank you very much ,
    but it's not really the same thing.

    That script can print everything because it contains both the lpr and libreoffice commands, it also gives an error message if you select a non-printable file (eg mp3) and you can have it in the default printer version or you can specify which printer to use, so in the context menu you can get "print with HP" or "Print with Samsung", for instance, and I find this very useful.

    I'm new to Kubuntu and I would like to have the same thing as Ubuntu Mate, if possible.

    Is that too much to ask?
    KDE Service Menus
    ( https://techbase.kde.org/Development..._Service_Menus )

    In KDE-speak a "servicemenu" is a special entry that appears in a context menu (or other context-based interface) for a file (or for directory), depending on the type of files that are selected.
    The KDE context menus are file type specific. You can't print mp3 file from the PDF print menu - If you have in the service menu desktop file:

    Code:
    MimeType=application/pdf


    KDE applications

    If applications are build on the top of the KDE framework then they could have the service menus off the box.

    Calligra Words:

    Code:
    $ calligrawords --help
    calligra.lib.pigment: Legacy integer arithmetics implementation
    Usage: calligrawords [options] [file(s)]
    Word processor
    
    Options:
    -h, --help                       Displays this help.
    .
    .
    .
    --print                          Only print and exit
    .
    .
    .
    Arguments:
    [file(s)]                        File(s) or URL(s) to open
    There is a service menu available off the box...



    Free and open...

    If you want service menus with the non KDE application you could add them yourself as 'oshunluvr' did.

    Libreoffice:
    Code:
    $ libreoffice --help
    LibreOffice 6.0.6.2 00m0(Build:2)
    
    Usage: soffice [argument...]
      argument - switches, switch parameters and document URIs (filenames).
    
    .
    .
    .
    -p                  Prints following files to the default printer, after
                      which those files are closed. The splash screen does
                      not appear. If the file name contains spaces, then it
                      must be enclosed in quotation marks.
    .
    .
    .
    and you could share your service menus with us.

    AskUbuntu - https://askubuntu.com/questions/1405...-odt-documents :
    Code:
    libreoffice --writer -p --headless 'filename1' 'filename2'
    Last edited by Rog131; Aug 11th 2018 at 04:25 PM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  9. Back To Top    #69
    Ascendant GreyGeek's Avatar
    Join Date
    Feb 2009
    Posts
    16,801
    Threads
    1192
    Local Date
    Dec 23rd 2020
    Local Time
    12:46 AM
    A post above gave the URL of a Dolphin PDF service menu:

    A sample: KDE 5 Service Menu PDF - https://store.kde.org/p/1227799/

    I attempted a few weeks ago to install GuiseppeBenigno's KDE 5 Service Menu PDF but no services were added after the install.

    Today I decided to uninstall it and try again. The results were the same. After investigating I found that without warning it would not install because a program, pdftk, was missing from the BIONIC repository and the upstream developers said it wouldn't be installed because it depended upon GJI, a java tool, which was no longer being maintained. Without that file the service menu failed to install.

    Looking around I found the deb package in ~/.local/share/servicemenu-download/kde-service-menu-pdf_1.0_all.deb

    All I needed was to do a workaround to get pdftk installed. I found it here: https://bugs.launchpad.net/ubuntu/+s...450/comments/4
    The following steps failed because it couldn't find gcc-6-base, which IS in the BIONIC repository. After I installed it the following steps installed pdftk:
    Code:
      wget http://archive.ubuntu.com/ubuntu/poo...ild1_amd64.deb
      wget http://archive.ubuntu.com/ubuntu/poo...ntu1_amd64.deb
      wget http://archive.ubuntu.com/ubuntu/poo...buntu1_all.deb
      sudo dpkg -i pdftk_2.02-4build1_amd64.deb libgcj17_6.4.0-8ubuntu1_amd64.deb libgcj-common_6.4-3ubuntu1_all.deb
    Instead of installing gcc-6-base separately you can make the last line:
    sudo dpkg -i gcc-6-base pdftk_2.02-4build1_amd64.deb libgcj17_6.4.0-8ubuntu1_amd64.deb libgcj-common_6.4-3ubuntu1_all.deb

    With pdftk installed I used Dolphin to browse to and right clicked on kde-service-menu-pdf_1.0_all.deb and let QApt Package Installer install it. Dolphin's service menu options were populated with the services supplied by that deb package.
    Last edited by GreyGeek; Aug 11th 2018 at 05:56 PM.

  10. Back To Top    #70
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:46 AM

    Post Dolphin dbus changes with the KDE Applications 18.08

    With the KDE Applications 18.08 (Dolphin) the 'Convert hard coded shortcuts to standard keys' has landed:

    - https://phabricator.kde.org/D11048
    - https://cgit.kde.org/dolphin.git/com...154782664d0835

    Before - reload:



    qdbus command:
    Code:
    $ qdbus org.kde.dolphin-914 /dolphin/Dolphin_1/actions/reload trigger
    After - redisplay:



    qdbus command:

    Code:
    qdbus org.kde.dolphin-2684 /dolphin/Dolphin_1/actions/view_redisplay trigger
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

Page 7 of 10 FirstFirst ... 56789 ... LastLast
Service Menus with Dolphin - Page 8
Page 8 of 10 FirstFirst ... 678910 LastLast
Results 71 to 80 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #71
    Cyborg sithlord48's Avatar
    Join Date
    Apr 2007
    Location
    127.0.0.1
    Posts
    2,956
    Threads
    42
    Local Date
    Dec 23rd 2020
    Local Time
    01:47 AM
    Quote Originally Posted by Rog131 View Post
    With the KDE Applications 18.08 (Dolphin) the 'Convert hard coded shortcuts to standard keys' has landed:

    - https://phabricator.kde.org/D11048
    - https://cgit.kde.org/dolphin.git/com...154782664d0835
    That diff looks familiar
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

  2. Back To Top    #72
    Newbie
    Join Date
    Aug 2018
    Posts
    3
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    Quote Originally Posted by oshunluvr View Post
    ...
    I tested this here on an image, a libreoffice document, a pdf, and a plain text file. Works for me.
    Thank you very much,
    The script for Nautilus/Caja file managers has some more features than this, in fact it also gives the error message in case of non-printable files, and gives the possibility to print all the printable files contained in a folder simply selecting it ... but after all, your is very good for common needs.
    The only change I made is to put the capital F, which allows you to select and print multiple files.

    [Desktop Entry]
    Actions=print-file
    Icon=print
    MimeType=application/pdf;image/*;application/vnd.oasis.opendocument.text;text/plain;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.presentation;application/msword;application/vnd.ms-word;application/vnd.ms-excel;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.wordprocessingml.document;applicati on/vnd.openxmlformats-officedocument.spreadsheet.sheet;application/vnd.openxmlformats-officedocument.presentationml.presentation;
    ServiceTypes=KonqPopupMenu/Plugin
    Encoding=UTF-8
    Type=Service
    X-KDE-Priority=TopLevel

    [Desktop Action print-file]
    Exec=lp %F
    Exec=libreoffice -p %F
    Icon=stock_print
    Name=Print
    The following procedure allows you to modify the previous script so that you can specify a different printer than the default one.

    Find the name of the printer you are using by typing in the terminal:
    lpstat -p -d
    Then replace the string 'Samsung-M2020-Series' with the name found using the command lpstat -p -d and 'PrintYourPrinter' with the name of your printer

    [Desktop Entry]
    Actions=print-file
    Icon=print
    MimeType=application/pdf;image/*;application/vnd.oasis.opendocument.text;text/plain;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.presentation;application/msword;application/vnd.ms-word;application/vnd.ms-excel;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.wordprocessingml.document;applicati on/vnd.openxmlformats-officedocument.spreadsheet.sheet;application/vnd.openxmlformats-officedocument.presentationml.presentation;
    ServiceTypes=KonqPopupMenu/Plugin
    Encoding=UTF-8
    Type=Service
    X-KDE-Priority=TopLevel

    [Desktop Action print-file]
    Exec=lp -P Samsung-M2020-Series %F
    Exec=libreoffice -pt Samsung-M2020-Series %F
    Icon=stock_print
    Name=PrintYourPrinter
    Last edited by SDG10; Sep 15th 2018 at 10:23 AM.

  3. Back To Top    #73
    Emergent AI Rog131's Avatar
    Join Date
    Nov 2005
    Posts
    4,410
    Threads
    123
    Local Date
    Dec 23rd 2020
    Local Time
    06:47 AM
    Remove selected thumbnails

    Part of the thumbnailtools/kenric: https://store.kde.org/p/1080815/ is the 'Remove selected thumbnails'.



    The servicemenu is using same code as the KDE to find the thumbnail names (kthumbnamefinder5):



    Preview clip with the Keneric - Scripting KDE video preview thumbnails:

    Direct: https://youtu.be/L694nghnPo8

    KDE Forums - Scripting KDE video preview thumbnails: https://forum.kde.org/viewtopic.php?...409077#p409077
    Last edited by Rog131; Jan 1st 2019 at 01:11 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

  4. Back To Top    #74
    Newbie
    Join Date
    Sep 2019
    Posts
    2
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM

    Context/Service menu refresh issue

    Quote Originally Posted by MoonRise View Post
    EDIT: Oddly I add that desktop entry to `/.kde/share/kde4/services/ServiceMenus/ but for some reason does not show up even on a reboot. Will play around some, but any feedback?
    Quote Originally Posted by vinnywright View Post
    are you running plasma5 ?

    try /home/vinny/.local/share/kservices5/ServiceMenus/ ,,,,,,,of corse change "vinny" to your user name and you may half to make the "kservices5" directory .
    Quote Originally Posted by oshunluvr View Post
    ..and rebooting isn't necessary. At the most closing and re-launching Dolphin, but even that shouldn't be necessary. They should be available immediately.
    Hmm, actually the refresh isn't immediate to me in Dolphin (and desktop) on Arch Linux, Plasma 5.16...
    At least when I change Name and Exec inside .desktop file, the command in context menu remains old.
    Does anyone know how to fix it so that refresh is immediate?

    I have discovered a workaround to it though - renaming the .desktop file (you may wish to do it back and forth) refreshes the action in context menu 100% reliably and immediately.
    Interestingly also moving in any direction between the two folders refreshes the context menu:
    /home/we/.local/share/kservices5/ServiceMenus/
    /home/we/.local/share/kservices5/
    because it turns out that .desktop files can be on either of these levels to work.

    Another discrepancy from advice in this thread I have noticed is that such Exec command will not launch a shell script from Service Menu:
    Code:
    Exec=zip.sh %U
    I need to launch a shell command and pass the script filename as parameter:
    Code:
    Exec=sh zip.sh %U
    I guess this is because I do not have a default program for handling .sh files defined. In any case, it took me hours to identify this was the reason things didn't work for me, so I am sharing this.
    Last edited by wojcieche; Sep 11th 2019 at 09:19 PM. Reason: Nothing changed, just turned on displaying smileys in this post.

  5. Back To Top    #75
    Kubuntu as a Second Language Don B. Cilly's Avatar
    Join Date
    Nov 2012
    Location
    Ibiza, Spain
    Posts
    1,233
    Threads
    59
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    It should execute directly if
    - It's set to +x (executable) and
    - has #!/bin/bash at the beginning.

  6. Back To Top    #76
    Cyborg
    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,093
    Threads
    74
    Local Date
    Dec 23rd 2020
    Local Time
    07:47 PM
    Quote Originally Posted by wojcieche View Post
    ...will not launch:
    Code:
    Exec=zip.sh %U
    ... need to:
    Code:
    Exec=sh zip.sh %U
    Assuming the script is executable, and has the shebang, I would ask, where is the script? If it is sitting in the working directory specified in the .desktop file, as I expect given that sh zip.sh works, then there is a path ($PATH) issue. By default the current directory is not in the path. You can avoid the issue by invoking the script with "./" prepended, so, does this work?
    Code:
    Exec=./zip.sh %U
    Regards, John Little

  7. Back To Top    #77
    Kubuntu as a Second Language Don B. Cilly's Avatar
    Join Date
    Nov 2012
    Location
    Ibiza, Spain
    Posts
    1,233
    Threads
    59
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    And just to b. cilly, the #!/bin/bash shebang will use bash, sh will use



    lrwxrwxrwx 1 root root 4 May 15 13:43 /bin/sh -> dash*


  8. Back To Top    #78
    Newbie
    Join Date
    Sep 2019
    Posts
    2
    Threads
    0
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    Quote Originally Posted by Don B. Cilly View Post
    It should execute directly if
    - It's set to +x (executable) and
    - has #!/bin/bash at the beginning.
    Quote Originally Posted by jlittle View Post
    Assuming the script is executable, and has the shebang, I would ask, where is the script? If it is sitting in the working directory specified in the .desktop file, as I expect given that sh zip.sh works, then there is a path ($PATH) issue. By default the current directory is not in the path. You can avoid the issue by invoking the script with "./" prepended, so, does this work?
    Code:
    Exec=./zip.sh %U
    Thanks guys! I had the script set to executable but was unaware of the shebang thing... ._. I added now and it works.
    I am still a newbie in many Linux areas, learning on the way by trying out new things - like just right here, sorry... ;-)

    I skipped the path to simplify the example, in fact I placed the script in a newly created directory in home and referenced to it using an absolute path, to make it reliable: ~/mybin/zip.sh
    Maybe it is just me but I feel the mybin as a directory name to store custom scripts is unpretty and misleading (sounds a bit like my trash bin not my binaries - although in root there is bin, oh well). Is there a Linux established location/naming convention where to put such user scripts?

    Also - how about the non-immediate refresh of context menu from .desktop files - looks like only I have this glitch? Maybe because of a different setup than yours - Arch + KDE Plasma + Dolphin...

  9. Back To Top    #79
    Cyborg
    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,093
    Threads
    74
    Local Date
    Dec 23rd 2020
    Local Time
    07:47 PM
    "bin" for binaries is ancient unix speak, getting on for 50 years now, if not more from a unix predecessor. /bin, /usr/bin, and /usr/local/bin will always be there.

    But I agree that these archaisms can be confusing and unfriendly. Exploring more pleasant names is IMO a good idea.
    Regards, John Little

  10. Back To Top    #80
    Kubuntu as a Second Language Don B. Cilly's Avatar
    Join Date
    Nov 2012
    Location
    Ibiza, Spain
    Posts
    1,233
    Threads
    59
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    Well, if you
    echo $PATH
    ~.local/bin should be there. Right?
    And not have much in it, owned by you... not a bad place for scripts, is it?

    About the refresh... just having to re-open Dolphin is not that bad...

Service Menus with Dolphin - Page 9
Page 9 of 10 FirstFirst ... 78910 LastLast
Results 81 to 90 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #81
    Cyborg
    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,093
    Threads
    74
    Local Date
    Dec 23rd 2020
    Local Time
    07:47 PM
    Quote Originally Posted by Don B. Cilly View Post
    Well, if you
    echo $PATH
    ~.local/bin should be there. Right?
    (Assuming you meant ~/.local/bin). I thought, surely not, and I don't, but then I checked /etc/skel/.profile, and it has
    Code:
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
    fi
    
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
    fi
    (The files in /etc/skel are copied when a new user is created.) I'd not seen this before.

    The last time I looked at the default .profile it didn't have the .local bin, but that would have been a few years ago now. One is quite free to muck about with this, and I always have. Also, I use zsh now, and it doesn't source .profile at all.
    Regards, John Little

  2. Back To Top    #82
    Emergent AI kubicle's Avatar
    Join Date
    Dec 2005
    Posts
    4,704
    Threads
    90
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    Quote Originally Posted by jlittle View Post
    Also, I use zsh now, and it doesn't source .profile at all.
    As a zsh user myself, I always symlink ~/.zprofile to ~/.profile just to get a more consistent experience/environment between shells.

    As far as good places for locally generated user scripts, both ~/bin and ~/.local/bin will work fine (personally I find ./local/bin a bit "cleaner" as it buried in a hidden directory), but one is of course free to use whatever one wishes (but it helps if you add that to $PATH one way or another).

    For system wide local scripts (meant for all users on the system), /usr/local/bin is the best place (you can also use /usr/local/sbin (generally for scripts meant for root only).

  3. Back To Top    #83
    Kubuntu as a Second Language Don B. Cilly's Avatar
    Join Date
    Nov 2012
    Location
    Ibiza, Spain
    Posts
    1,233
    Threads
    59
    Local Date
    Dec 23rd 2020
    Local Time
    08:47 AM
    Actually, I just realised that the "sudo touch" action doesn't work.
    I had just tried it on "normal" files", not root-owned ones.
    Then, I had the "Beached Dolphin" debacle, and left testing.
    Until today, when Neon updated the kernel (an older one, again) and I had to "touch" the /boot entries.

    If I right-click on a root-owned file , no actions are available.
    If I use root-mode Dolphin, it doesn't find the actions (they're probably supposed to go in another place).

    If I use root-mode Krusader, I set up the action within it , it works just fine. Which it would, I set it up in root mode...
    Still, that's another point to Krusader. You just click Manage User Actions, use 'touch %aCurrent%' as a command, and Robert's you father's brother.
    No need to edit abstruse .desktop files in far-away directories.

  4. Back To Top    #84
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:47 AM

    How to change user and group ownership to root via service menu?

    OS: Kubuntu 18.04

    I have this service menu

    Code:
    [Desktop Action move-file]
    
    Exec=/usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu mv "%U" /usr/share/applications
    
    Name=Move file
    
    Icon=document-send
    
    [Desktop Entry]
    Actions=move-file
    
    MimeType=application/x-desktop;
    
    ServiceTypes=KonqPopupMenu/Plugin
    Type=Service
    X-KDE-Priority=TopLevel
    The "Move file" option appears in Dolphin's right-click menu if the file being right-clicked is a .desktop file.

    It pops up a window for me to enter my password and then moves the file to the destination folder.

    However, the user and group are still mine, not root. How can I fix that in the Exec= line?

    I can modify the Exec= line to copy the file's path like this:

    Code:
    Exec=printf %U | xsel -b -i && /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu mv "%U" ...
    and that works to the extent that the file's path is in the clipboard (checked by using Ctrl+V in Kate) and the file is moved.

    But then I'd also want something like
    Code:
    sudo chown root:root basename
    to act on the clipboard contents in the destination folder. Is that possible and if so, how to do it correctly?




    This works:

    Code:
    Exec=printf %U | xsel -b -i && /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu mv "%U" /usr/share/applications && cd /usr/share/applications && /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu chown root:root $( basename $(xsel -b -o) )
    Last edited by chimak111; Oct 8th 2019 at 08:52 AM.
    Kubuntu 20.04

  5. Back To Top    #85
    Cyborg
    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    2,093
    Threads
    74
    Local Date
    Dec 23rd 2020
    Local Time
    07:47 PM
    Wouldn't it be easier to invoke a script in the Exec line, and get the script to do what's needed, with many advantages, like
    • relaxed layout
    • comments
    • meaningful variable names
    • opportunities for logging
    • testing in isolation
    • syntax highlighting while editing
    • use of favourite scripting language

    and so on?
    Regards, John Little

  6. Back To Top    #86
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:47 AM
    Quote Originally Posted by jlittle View Post
    Wouldn't it be easier to invoke a script in the Exec line, and get the script to do what's needed, with many advantages, ...
    No doubt about that but I have my limitations

    Plus this issue came up as a question in another site. It's not something I plan on doing personally. The .desktop files I make or modify stay in ~/.local/share/applications.
    Kubuntu 20.04

  7. Back To Top    #87
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:47 AM

    Service Menu to move selected files in a folder to a new subfolder

    I came across this reddit thread: Dolphin: New folder with selected files ... how? and a response there points to this: https://aur.archlinux.org/packages/k...rwithselection

    So I created $HOME/.local/share/kservices5/ServiceMenus/new_folder_with_selection.desktop with

    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
    MimeType=Application/octet-stream;inode/directory
    Actions=NFFS
    
    [Desktop Action NFFS]
    Name=New Folder with Selection
    Icon=folder-download
    Exec=sh /$HOME/bin/new_folder_with_selection.sh %U
    and
    $HOME/bin/new_folder_with_selection.sh with
    Code:
    #!/bin/sh
    
    dirname="$(kdialog \
     --inputbox "Folder to be created" "New Folder" \
     )" &&
    
    mkdir -p -- "$dirname" &&
    
    mv --target-directory="$dirname" -- "$@" ||
    
    kdialog --error "Something went wrong"
    Kubuntu 20.04

  8. Back To Top    #88
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    11,074
    Threads
    474
    Local Date
    Dec 23rd 2020
    Local Time
    01:47 AM
    I want one to move files/folders up one folder - something I seem to do a lot. Seems easy enough, just haven't gotten around to it.
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

  9. Back To Top    #89
    Esteemed Member kyonides's Avatar
    Join Date
    Jan 2009
    Posts
    683
    Threads
    108
    Local Date
    Dec 23rd 2020
    Local Time
    12:47 AM
    Do you mean to move to a parent folder? Like in mv ../anything? Or like mv folder/new_folder?
    Multibooting: Kubuntu Focal Fossa 20.04
    Before: Precise 12.04 Xenial 16.04 and Bionic 18.04
    Win 10 sadly
    Using Linux since June, 2008

  10. Back To Top    #90
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    11,074
    Threads
    474
    Local Date
    Dec 23rd 2020
    Local Time
    01:47 AM
    Yes, just up to the parent folder.

    But it would be cool to have a "create folder and move" dialog. Sounds like a fun weekend project!
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

Service Menus with Dolphin - Page 10
Page 10 of 10 FirstFirst ... 8910
Results 91 to 93 of 93

Thread: Service Menus with Dolphin

  1. Back To Top    #91
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    11,074
    Threads
    474
    Local Date
    Dec 23rd 2020
    Local Time
    01:48 AM
    This works to move up one. Doesn't warn about failure if you don;t have permission;

    Code:
    [Desktop Entry]
    Type=Service
    Icon=transform-shear-up
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=moveUp;
    X-KDE-Priority=TopLevel
    #X-KDE-Submenu=
    Encoding=UTF-8
    
    [Desktop Action moveUp]
    Name=Move up one level
    Icon=transform-shear-up
    Exec=echo "%U" | sed 's# /#\\n/#g' | while read url; do kdemv5 "$url" ..; done
    
    
    Stole most of this code from Rog...
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

  2. Back To Top    #92
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:48 AM
    Kubuntu 20.04

  3. Back To Top    #93
    Kubuntu as a Second Language
    Join Date
    Mar 2013
    Posts
    1,261
    Threads
    203
    Local Date
    Dec 23rd 2020
    Local Time
    06:48 AM
    I made this service menu to copy a file to the same location with a timestamp added to the end of the target filename.

    Code:
    [Desktop Action copy-with-stamp]
    Exec=cp-with-timestamp.sh %U
    Name=Add timestamp as suffix
    Icon=edit-copy
    
    [Desktop Entry]
    Actions=copy-with-stamp
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/all
    Type=Service
    X-KDE-Priority=TopLevel
    The script, cp-with-timestamp.sh, is this:
    Code:
    #!/bin/bash
    
    cp "$@" "$@"-"$(date +%Y%m%d%H%M%S)"
    I had to use the script because I couldn't figure out how to get it done directly from the .desktop file. If it's possible can someone please show me. Thanks!
    Kubuntu 20.04

Page 10 of 10 FirstFirst ... 8910